[gtk+/gtk-style-context: 272/490] GtkStyle: Match "trough" and "slider" detail strings.



commit b4fc6be22d012fdad64e512f5988980a4623d099
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Oct 22 23:59:58 2010 +0200

    GtkStyle: Match "trough" and "slider" detail strings.
    
    This is so scrollbars can be themed throught the "trough" and
    "slider" classes.

 gtk/gtkstyle.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 8ba9e97..c7ce8bb 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -1801,7 +1801,7 @@ transform_detail_string (const gchar     *detail,
   else if (strcmp (detail, "viewport") == 0 ||
 	   strcmp (detail, "viewportbin") == 0)
     gtk_style_context_add_class (context, "viewport");
-  else if (strcmp (detail, "trough") == 0)
+  else if (strncmp (detail, "trough", 6) == 0)
     {
       gtk_style_context_add_class (context, "scrollbar");
       gtk_style_context_add_class (context, "trough");
@@ -1820,6 +1820,8 @@ transform_detail_string (const gchar     *detail,
       gtk_style_context_add_class (context, "button");
       gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP);
     }
+  else if (strcmp (detail, "slider") == 0)
+    gtk_style_context_add_class (context, "slider");
   else if (g_str_has_prefix (detail, "cell_"))
     {
       GtkRegionFlags row, col;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]