forked from AuroraMiddleware/gtk
Revert "Scale: Always sync ::digits to Range::round-digits"
This reverts commit 4a6bd134bd
.
This change in behavior broke various things.
https://bugzilla.gnome.org/show_bug.cgi?id=781605
This commit is contained in:
parent
dfcde113e8
commit
197355e15a
@ -1115,7 +1115,8 @@ gtk_scale_set_digits (GtkScale *scale,
|
|||||||
if (priv->digits != digits)
|
if (priv->digits != digits)
|
||||||
{
|
{
|
||||||
priv->digits = digits;
|
priv->digits = digits;
|
||||||
gtk_range_set_round_digits (range, digits);
|
if (priv->draw_value)
|
||||||
|
gtk_range_set_round_digits (range, digits);
|
||||||
|
|
||||||
gtk_scale_clear_value_layout (scale);
|
gtk_scale_clear_value_layout (scale);
|
||||||
gtk_widget_queue_resize (GTK_WIDGET (scale));
|
gtk_widget_queue_resize (GTK_WIDGET (scale));
|
||||||
@ -1307,6 +1308,7 @@ gtk_scale_set_draw_value (GtkScale *scale,
|
|||||||
else
|
else
|
||||||
gtk_css_node_insert_before (widget_node, gtk_css_gadget_get_node (priv->value_gadget), NULL);
|
gtk_css_node_insert_before (widget_node, gtk_css_gadget_get_node (priv->value_gadget), NULL);
|
||||||
|
|
||||||
|
gtk_range_set_round_digits (GTK_RANGE (scale), priv->digits);
|
||||||
update_value_position (scale);
|
update_value_position (scale);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1314,6 +1316,8 @@ gtk_scale_set_draw_value (GtkScale *scale,
|
|||||||
if (priv->value_gadget)
|
if (priv->value_gadget)
|
||||||
gtk_css_node_set_parent (gtk_css_gadget_get_node (priv->value_gadget), NULL);
|
gtk_css_node_set_parent (gtk_css_gadget_get_node (priv->value_gadget), NULL);
|
||||||
g_clear_object (&priv->value_gadget);
|
g_clear_object (&priv->value_gadget);
|
||||||
|
|
||||||
|
gtk_range_set_round_digits (GTK_RANGE (scale), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_scale_clear_value_layout (scale);
|
gtk_scale_clear_value_layout (scale);
|
||||||
|
Loading…
Reference in New Issue
Block a user