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.
This commit is contained in:
Timm Bäder 2019-08-26 18:58:42 +02:00
parent 80411fb905
commit e86bf764a8

View File

@ -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: