[gtk] scale: Allocate value close to slider
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] scale: Allocate value close to slider
- Date: Mon, 9 Sep 2019 15:46:21 +0000 (UTC)
commit e86bf764a822b20786e3eaae088adb66b44ff7e6
Author: Timm Bäder <mail baedert org>
Date: Mon Aug 26 18:58:42 2019 +0200
scale: Allocate value close to slider
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 7a007c4e6b..1549f21370 100644
--- 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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]