diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-11-14 10:28:54 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-11-14 12:32:57 -0500 |
commit | 6c5d08d75a87db78eb9565551b18d8d897792ab5 (patch) | |
tree | 8d65507785c1d051d2ed3b12fe2d4091e53be520 /gtk/gtkrange.c | |
parent | 3007ad6f3baf3713483a71fba2154ea16d87b310 (diff) | |
download | gtk+-6c5d08d75a87db78eb9565551b18d8d897792ab5.tar.gz |
Cosmetic: Avoid explicit state variables
Fold it into its single user.
Diffstat (limited to 'gtk/gtkrange.c')
-rw-r--r-- | gtk/gtkrange.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index c87ad179f2..301b645041 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -1935,7 +1935,6 @@ gtk_range_draw (GtkWidget *widget, { GtkRange *range = GTK_RANGE (widget); GtkRangePrivate *priv = range->priv; - GtkStateFlags widget_state; gboolean draw_trough = TRUE; gboolean draw_slider = TRUE; GtkStyleContext *context; @@ -1958,8 +1957,6 @@ gtk_range_draw (GtkWidget *widget, gtk_range_calc_marks (range); gtk_range_calc_layout (range); - widget_state = gtk_widget_get_state_flags (widget); - /* Just to be confusing, we draw the trough for the whole * range rectangle, not the trough rectangle (the trough * rectangle is just for hit detection) @@ -2140,7 +2137,8 @@ gtk_range_draw (GtkWidget *widget, } } - if (!(widget_state & GTK_STATE_FLAG_INSENSITIVE) && gtk_widget_has_visible_focus (widget)) + if (!(gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_INSENSITIVE) && + gtk_widget_has_visible_focus (widget)) { gtk_render_focus (context, cr, priv->range_rect.x, |