[gtk+/win32-theme2: 10/18] Add top/left/bottom/right style classes to steppers
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/win32-theme2: 10/18] Add top/left/bottom/right style classes to steppers
- Date: Fri, 18 Nov 2011 15:58:18 +0000 (UTC)
commit a038c589db79c90885a5096509224f500b7171d9
Author: Alexander Larsson <alexl redhat com>
Date: Thu Nov 17 17:34:05 2011 +0100
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 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 568acd0..4595759 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]