[gtk+] spinbutton: Use right state when querying padding
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] spinbutton: Use right state when querying padding
- Date: Fri, 6 Nov 2015 17:59:43 +0000 (UTC)
commit 37b4b60e9127b3604994f92b5d2715ba2a310597
Author: Benjamin Otte <otte redhat com>
Date: Fri Nov 6 18:49:26 2015 +0100
spinbutton: Use right state when querying padding
gtk/gtkspinbutton.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 7375b5f..4826f5d 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -966,21 +966,19 @@ gtk_spin_button_panel_get_size (GtkSpinButton *spin_button,
GtkSpinButtonPrivate *priv = spin_button->priv;
GtkBorder button_padding, button_border;
GtkStyleContext *context;
- GtkStateFlags state;
gint icon_size, w, h;
gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &w, &h);
icon_size = MAX (w, h);
context = gtk_widget_get_style_context (GTK_WIDGET (spin_button));
- state = gtk_style_context_get_state (context);
if (panel == priv->up_panel)
gtk_style_context_save_to_node (context, priv->up_node);
else
gtk_style_context_save_to_node (context, priv->down_node);
- gtk_style_context_get_padding (context, state, &button_padding);
- gtk_style_context_get_border (context, state, &button_border);
+ gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &button_padding);
+ gtk_style_context_get_border (context, gtk_style_context_get_state (context), &button_border);
gtk_style_context_restore (context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]