[gtk+/gtk-style-context: 274/276] GtkStyle: Handle scrollbar buttons.



commit 018a1f4a85fa73c59dd01f882dee94f1a27ce7ec
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Oct 23 18:25:18 2010 +0200

    GtkStyle: Handle scrollbar buttons.

 gtk/gtkstyle.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index c7ce8bb..7e8906a 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -1820,8 +1820,17 @@ 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 ((detail[0] == 'h' || detail[0] == 'v') &&
+           strncmp (&detail[1], "scrollbar_", 10) == 0)
+    {
+      gtk_style_context_add_class (context, "button");
+      gtk_style_context_add_class (context, "scrollbar");
+    }
   else if (strcmp (detail, "slider") == 0)
-    gtk_style_context_add_class (context, "slider");
+    {
+      gtk_style_context_add_class (context, "slider");
+      gtk_style_context_add_class (context, "scrollbar");
+    }
   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]