summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2011-05-06 14:33:00 -0400
committerCosimo Cecchi <cosimoc@gnome.org>2011-05-06 15:10:43 -0400
commit73d9ca67e6ea1021ebee4351a9cf0a10b07178da (patch)
tree138de4a36118c5c7f9283df7767db7203ce20948 /gtk
parente805320a14fbec6ffbb8e911e596868e9e8fd6f8 (diff)
downloadgtk+-73d9ca67e6ea1021ebee4351a9cf0a10b07178da.tar.gz
cellrendererprogress: don't force drawing inside the border
The progressbar is composed by two different rendered areas: the trough (i.e. the non-filled part of the bar) and the bar itself. The bar should be able to fill the whole height/width of the trough without resorting to nasty hacks in the theme, and we can control the amount of space between the bar and the trough with the padding already. https://bugzilla.gnome.org/show_bug.cgi?id=649593
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcellrendererprogress.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gtk/gtkcellrendererprogress.c b/gtk/gtkcellrendererprogress.c
index 82abe680f0..caa26d16ba 100644
--- a/gtk/gtkcellrendererprogress.c
+++ b/gtk/gtkcellrendererprogress.c
@@ -548,7 +548,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
GtkCellRendererProgress *cellprogress = GTK_CELL_RENDERER_PROGRESS (cell);
GtkCellRendererProgressPrivate *priv= cellprogress->priv;
GtkStyleContext *context;
- GtkBorder padding, border;
+ GtkBorder padding;
PangoLayout *layout;
PangoRectangle logical_rect;
gint x, y, w, h, x_pos, y_pos, bar_position, bar_size, start, full_size;
@@ -571,13 +571,12 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
gtk_render_background (context, cr, x, y, w, h);
gtk_render_frame (context, cr, x, y, w, h);
- gtk_style_context_get_border (context, GTK_STATE_FLAG_NORMAL, &border);
gtk_style_context_get_padding (context, GTK_STATE_FLAG_NORMAL, &padding);
- x += border.left + padding.left;
- y += border.top + padding.top;
- w -= border.left + border.right + padding.left + padding.right;
- h -= border.top + border.bottom + padding.top + padding.bottom;
+ x += padding.left;
+ y += padding.top;
+ w -= padding.left + padding.right;
+ h -= padding.top + padding.bottom;
gtk_style_context_restore (context);