projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80411fb
)
scale: Allocate value close to slider
author
Timm Bäder
<mail@baedert.org>
Mon, 26 Aug 2019 16:58:42 +0000
(18:58 +0200)
committer
Timm Bäder
<mail@baedert.org>
Mon, 9 Sep 2019 15:36:25 +0000
(17:36 +0200)
The scale might be allocated at a height greater than requested, and in
that case y=0 is just too far away. Allocate the value directly next to
the slider instead.
gtk/gtkscale.c
patch
|
blob
|
history
diff --git
a/gtk/gtkscale.c
b/gtk/gtkscale.c
index 7a007c4e6b9f4c05b0fd10e74afd08244888cea4..1549f2137011120477f03569f8f6c7509523bebb 100644
(file)
--- a/
gtk/gtkscale.c
+++ b/
gtk/gtkscale.c
@@
-366,7
+366,7
@@
gtk_scale_allocate_value (GtkScale *scale)
case GTK_POS_TOP:
value_alloc.x = slider_bounds.origin.x + (slider_bounds.size.width - value_alloc.width) / 2;
- value_alloc.y =
0
;
+ value_alloc.y =
slider_bounds.origin.y - value_alloc.height
;
break;
case GTK_POS_BOTTOM: