scale: Fix value widget measurement

Since we set the size request of the label, the later measure()
call would return at least the size we set, making the size only ever
grow.
This commit is contained in:
Timm Bäder
2019-08-09 14:26:57 +02:00
parent ea5fc348fa
commit 87aeec2b63

View File

@@ -253,6 +253,7 @@ update_label_request (GtkScale *scale)
highest_value = gtk_adjustment_get_upper (adjustment);
old_text = g_strdup (gtk_label_get_label (GTK_LABEL (priv->value_widget)));
gtk_widget_set_size_request (priv->value_widget, -1, -1);
text = gtk_scale_format_value (scale, lowest_value);
gtk_label_set_label (GTK_LABEL (priv->value_widget), text);