summaryrefslogtreecommitdiff
path: root/gtk/gtkcellrendererpixbuf.c
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@codefactory.se>2001-07-13 06:30:15 +0000
committerAnders Carlsson <andersca@src.gnome.org>2001-07-13 06:30:15 +0000
commit2afa5510dc12ca5e94f615b3080c55bd8e2fb8bb (patch)
tree05f03698ca5754fd1c4655b759eae5f63220bdc4 /gtk/gtkcellrendererpixbuf.c
parentc042389acc3ea0578edf2581c66a850514e8c66a (diff)
downloadgdk-pixbuf-2afa5510dc12ca5e94f615b3080c55bd8e2fb8bb.tar.gz
Take into account the xpad and ypad when calculating the width and the
2001-07-13 Anders Carlsson <andersca@codefactory.se> * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render): Take into account the xpad and ypad when calculating the width and the height of the pixbuf cell.
Diffstat (limited to 'gtk/gtkcellrendererpixbuf.c')
-rw-r--r--gtk/gtkcellrendererpixbuf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c
index 0bb2cb8c9..66649e444 100644
--- a/gtk/gtkcellrendererpixbuf.c
+++ b/gtk/gtkcellrendererpixbuf.c
@@ -248,9 +248,12 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer *cell,
&pix_rect.y,
&pix_rect.width,
&pix_rect.height);
+
pix_rect.x += cell_area->x;
pix_rect.y += cell_area->y;
-
+ pix_rect.width -= cell->xpad * 2;
+ pix_rect.height -= cell->ypad * 2;
+
if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect))
gdk_pixbuf_render_to_drawable_alpha (pixbuf,
window,