[gtk+] scale: Stop using style classes for marks
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] scale: Stop using style classes for marks
- Date: Fri, 6 Nov 2015 12:05:29 +0000 (UTC)
commit bfee2d3c61a7dc852bae2016a7ec8ee1ee2ca641
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Nov 6 07:01:42 2015 -0500
scale: Stop using style classes for marks
We can use :first/last-child for this now.
gtk/gtkscale.c | 20 --------------------
1 files changed, 0 insertions(+), 20 deletions(-)
---
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 9c582da..401f887 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -1536,7 +1536,6 @@ void
gtk_scale_clear_marks (GtkScale *scale)
{
GtkScalePrivate *priv;
- GtkStyleContext *context;
g_return_if_fail (GTK_IS_SCALE (scale));
@@ -1545,10 +1544,6 @@ gtk_scale_clear_marks (GtkScale *scale)
g_slist_free_full (priv->marks, gtk_scale_mark_free);
priv->marks = NULL;
- context = gtk_widget_get_style_context (GTK_WIDGET (scale));
- gtk_style_context_remove_class (context, GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW);
- gtk_style_context_remove_class (context, GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE);
-
if (priv->top_marks_node)
{
gtk_css_node_set_parent (priv->top_marks_node, NULL);
@@ -1600,7 +1595,6 @@ gtk_scale_add_mark (GtkScale *scale,
GSList *m;
gdouble *values;
gint n, i;
- GtkStyleContext *context;
GtkCssNode *widget_node, *marks_node;
g_return_if_fail (GTK_IS_SCALE (scale));
@@ -1688,20 +1682,6 @@ gtk_scale_add_mark (GtkScale *scale,
g_free (values);
- /* Set the style classes for the slider, so it could
- * point to the right direction when marks are present
- */
- context = gtk_widget_get_style_context (GTK_WIDGET (scale));
-
- if (priv->top_marks_node)
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE);
- else
- gtk_style_context_remove_class (context, GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE);
- if (priv->bottom_marks_node)
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW);
- else
- gtk_style_context_remove_class (context, GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW);
-
gtk_widget_queue_resize (GTK_WIDGET (scale));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]