From a038c589db79c90885a5096509224f500b7171d9 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 17 Nov 2011 17:34:05 +0100 Subject: Add top/left/bottom/right style classes to steppers This is needed for e.g. win32 theming, but is also generally useful. --- gtk/gtkrange.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gtk/gtkrange.c') 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); -- cgit v1.2.1