From: Timm Bäder Date: Mon, 26 Aug 2019 16:58:42 +0000 (+0200) Subject: scale: Allocate value close to slider X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~20^2~926 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e86bf764a822b20786e3eaae088adb66b44ff7e6;p=gtk4.git 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. --- 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: