[gtk/wip/baedert/for-master: 94/146] scale: Allocate value close to slider



commit 3cb5126f9d9c5f878dd51f76918c4c94f54f2021
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]