Don't add class "scrollbar" for every trough
Turns out "trough" as a detail string is used in a variety of widgets, not all of which are scrollbars.
This commit is contained in:
parent
2578f4f4c3
commit
5adfe6029d
@ -118,6 +118,10 @@ gtk_scrollbar_class_init (GtkScrollbarClass *class)
|
|||||||
static void
|
static void
|
||||||
gtk_scrollbar_init (GtkScrollbar *scrollbar)
|
gtk_scrollbar_init (GtkScrollbar *scrollbar)
|
||||||
{
|
{
|
||||||
|
GtkStyleContext *context;
|
||||||
|
|
||||||
|
context = gtk_widget_get_style_context (GTK_WIDGET (scrollbar));
|
||||||
|
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SCROLLBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1805,10 +1805,7 @@ transform_detail_string (const gchar *detail,
|
|||||||
strcmp (detail, "viewportbin") == 0)
|
strcmp (detail, "viewportbin") == 0)
|
||||||
gtk_style_context_add_class (context, "viewport");
|
gtk_style_context_add_class (context, "viewport");
|
||||||
else if (strncmp (detail, "trough", 6) == 0)
|
else if (strncmp (detail, "trough", 6) == 0)
|
||||||
{
|
|
||||||
gtk_style_context_add_class (context, "scrollbar");
|
|
||||||
gtk_style_context_add_class (context, "trough");
|
gtk_style_context_add_class (context, "trough");
|
||||||
}
|
|
||||||
else if (strcmp (detail, "spinbutton") == 0)
|
else if (strcmp (detail, "spinbutton") == 0)
|
||||||
gtk_style_context_add_class (context, "spinbutton");
|
gtk_style_context_add_class (context, "spinbutton");
|
||||||
else if (strcmp (detail, "spinbutton_up") == 0)
|
else if (strcmp (detail, "spinbutton_up") == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user