]> Pileus Git - ~andy/gtk/commitdiff
progressbar: fetch the padding without the trough style class
authorCosimo Cecchi <cosimoc@gnome.org>
Fri, 6 May 2011 18:53:09 +0000 (14:53 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Fri, 6 May 2011 19:10:43 +0000 (15:10 -0400)
This is consistent with the rest of the widget, which uses only one
padding value.

https://bugzilla.gnome.org/show_bug.cgi?id=649593

gtk/gtkprogressbar.c

index c4fb26627aaf6b0b5a0ca0106229c3404c000006..46e9aa42b7d40a859cbf7f1b04d37064ba06e5e0 100644 (file)
@@ -965,6 +965,7 @@ gtk_progress_bar_draw (GtkWidget      *widget,
 
   context = gtk_widget_get_style_context (widget);
   state = gtk_widget_get_state_flags (widget);
+  gtk_style_context_get_padding (context, state, &padding);
 
   orientation = priv->orientation;
   inverted = priv->inverted;
@@ -982,8 +983,6 @@ gtk_progress_bar_draw (GtkWidget      *widget,
   gtk_render_background (context, cr, 0, 0, width, height);
   gtk_render_frame (context, cr, 0, 0, width, height);
 
-  gtk_style_context_get_padding (context, state, &padding);
-
   gtk_style_context_restore (context);
 
   if (priv->activity_mode)