summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-11-26 18:38:43 -0500
committerMatthias Clasen <mclasen@redhat.com>2014-11-26 18:38:43 -0500
commit80dbb4186a6fb7f950b6bd37b7788f168450ce8d (patch)
tree45dba4c0d2538167029acd4c0f06e832681940b7
parent50076ed95b2f9bd1bb2e8fbdd3ba0bffe4490804 (diff)
downloadgtk+-80dbb4186a6fb7f950b6bd37b7788f168450ce8d.tar.gz
GtkSpinButton: Use the proper state
Use the style contexts current state when querying it.
-rw-r--r--gtk/gtkspinbutton.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 5c4d92b55e..6408abff72 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -972,12 +972,14 @@ gtk_spin_button_panel_get_allocations (GtkSpinButton *spin_button,
gint up_panel_width, up_panel_height;
GtkStyleContext *context;
GtkBorder border;
+ GtkStateFlags state;
gtk_widget_get_allocation (widget, &spin_allocation);
gtk_widget_get_preferred_size (widget, &requisition, NULL);
context = gtk_widget_get_style_context (GTK_WIDGET (spin_button));
- gtk_style_context_get_border (context, GTK_STATE_FLAG_NORMAL, &border);
+ state = gtk_style_context_get_state (context);
+ gtk_style_context_get_border (context, state, &border);
gtk_spin_button_panel_get_size (spin_button, priv->down_panel, &down_panel_width, &down_panel_height);
gtk_spin_button_panel_get_size (spin_button, priv->up_panel, &up_panel_width, &up_panel_height);