mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-04 09:40:19 +00:00
scale: always add marks at the beginning or the end
Marks are always either the first or the last child of the scale.
This commit is contained in:
parent
1d047f0097
commit
a9ea544f3d
@ -3924,12 +3924,6 @@ _gtk_range_set_steppers (GtkRange *range,
|
||||
gtk_widget_queue_resize (GTK_WIDGET (range));
|
||||
}
|
||||
|
||||
GtkCssNode *
|
||||
gtk_range_get_trough_node (GtkRange *range)
|
||||
{
|
||||
return gtk_css_gadget_get_node (range->priv->trough_gadget);
|
||||
}
|
||||
|
||||
GtkCssGadget *
|
||||
gtk_range_get_slider_gadget (GtkRange *range)
|
||||
{
|
||||
|
@ -49,7 +49,6 @@ void _gtk_range_set_steppers (GtkRange *range
|
||||
gboolean has_c,
|
||||
gboolean has_d);
|
||||
|
||||
GtkCssNode *gtk_range_get_trough_node (GtkRange *range);
|
||||
GtkCssGadget *gtk_range_get_slider_gadget (GtkRange *range);
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -1650,7 +1650,7 @@ gtk_scale_add_mark (GtkScale *scale,
|
||||
widget_node = gtk_widget_get_css_node (GTK_WIDGET (scale));
|
||||
priv->top_marks_node = gtk_css_node_new ();
|
||||
gtk_css_node_set_name (priv->top_marks_node, I_("marks"));
|
||||
gtk_css_node_insert_before (widget_node, priv->top_marks_node, gtk_range_get_trough_node (GTK_RANGE (scale)));
|
||||
gtk_css_node_insert_after (widget_node, priv->top_marks_node, NULL);
|
||||
gtk_css_node_set_parent (priv->top_marks_node, widget_node);
|
||||
gtk_css_node_add_class (priv->top_marks_node, g_quark_from_static_string (GTK_STYLE_CLASS_TOP));
|
||||
gtk_css_node_set_state (priv->top_marks_node, gtk_css_node_get_state (widget_node));
|
||||
@ -1665,7 +1665,7 @@ gtk_scale_add_mark (GtkScale *scale,
|
||||
widget_node = gtk_widget_get_css_node (GTK_WIDGET (scale));
|
||||
priv->bottom_marks_node = gtk_css_node_new ();
|
||||
gtk_css_node_set_name (priv->bottom_marks_node, I_("marks"));
|
||||
gtk_css_node_insert_after (widget_node, priv->bottom_marks_node, gtk_range_get_trough_node (GTK_RANGE (scale)));
|
||||
gtk_css_node_insert_before (widget_node, priv->bottom_marks_node, NULL);
|
||||
gtk_css_node_add_class (priv->bottom_marks_node, g_quark_from_static_string (GTK_STYLE_CLASS_BOTTOM));
|
||||
gtk_css_node_set_state (priv->bottom_marks_node, gtk_css_node_get_state (widget_node));
|
||||
g_object_unref (priv->bottom_marks_node);
|
||||
|
Loading…
Reference in New Issue
Block a user