summaryrefslogtreecommitdiff
path: root/gtk/gtkrange.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2011-11-17 17:34:05 +0100
committerAlexander Larsson <alexl@redhat.com>2011-11-17 17:34:05 +0100
commita038c589db79c90885a5096509224f500b7171d9 (patch)
tree9c9bbc9fbf19bf526a8d954dfd35b5ab452d5899 /gtk/gtkrange.c
parentfdbf029df3e5c8e631784a1289af5c138361c805 (diff)
downloadgtk+-a038c589db79c90885a5096509224f500b7171d9.tar.gz
Add top/left/bottom/right style classes to steppers
This is needed for e.g. win32 theming, but is also generally useful.
Diffstat (limited to 'gtk/gtkrange.c')
-rw-r--r--gtk/gtkrange.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 568acd08ab..45957594f4 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -1922,6 +1922,23 @@ draw_stepper (GtkRange *range,
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BUTTON);
gtk_style_context_set_state (context, state);
+ switch (arrow_type)
+ {
+ case GTK_ARROW_RIGHT:
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT);
+ break;
+ case GTK_ARROW_DOWN:
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_BOTTOM);
+ break;
+ case GTK_ARROW_LEFT:
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT);
+ break;
+ case GTK_ARROW_UP:
+ default:
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOP);
+ break;
+ }
+
gtk_render_background (context, cr,
rect->x, rect->y,
rect->width, rect->height);