diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-11-14 10:30:16 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-11-14 12:32:57 -0500 |
commit | bcc6df00e58cb8f914aebbb3c6152a84849d0e82 (patch) | |
tree | 494648c928e2fd54351a68ecba492eb8e86101f3 /gtk/gtktoolbar.c | |
parent | 828a66b4aa3851209b65e270380561cc0736b23c (diff) | |
download | gtk+-bcc6df00e58cb8f914aebbb3c6152a84849d0e82.tar.gz |
Cosmetic: Avoid explicit state variables
Using the state of the context makes this more obviously correct.
Diffstat (limited to 'gtk/gtktoolbar.c')
-rw-r--r-- | gtk/gtktoolbar.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index 57bfcb4dcb..ccf7a48004 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -3575,7 +3575,6 @@ _gtk_toolbar_paint_space_line (GtkWidget *widget, { GtkOrientation orientation; GtkStyleContext *context; - GtkStateFlags state; GtkBorder padding; gint width, height; const gdouble start_fraction = (SPACE_LINE_START / SPACE_LINE_DIVISION); @@ -3585,11 +3584,11 @@ _gtk_toolbar_paint_space_line (GtkWidget *widget, orientation = toolbar ? toolbar->priv->orientation : GTK_ORIENTATION_HORIZONTAL; - context = gtk_widget_get_style_context (widget); - state = gtk_widget_get_state_flags (widget); width = gtk_widget_get_allocated_width (widget); height = gtk_widget_get_allocated_height (widget); - gtk_style_context_get_padding (context, state, &padding); + + context = gtk_widget_get_style_context (widget); + gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &padding); if (orientation == GTK_ORIENTATION_HORIZONTAL) { |