summaryrefslogtreecommitdiff
path: root/gtk/gtkscale.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkscale.c')
-rw-r--r--gtk/gtkscale.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index fc0121de97..6d71292e14 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -1901,12 +1901,11 @@ gtk_scale_get_layout (GtkScale *scale)
priv = scale->priv;
- if (!priv->layout)
+ if (!priv->layout && priv->draw_value)
{
int min_layout_width;
- if (priv->draw_value)
- priv->layout = gtk_widget_create_pango_layout (GTK_WIDGET (scale), NULL);
+ priv->layout = gtk_widget_create_pango_layout (GTK_WIDGET (scale), NULL);
gtk_css_gadget_get_preferred_size (priv->value_gadget,
GTK_ORIENTATION_HORIZONTAL, -1,