diff options
author | Kristian Rietveld <kris@gtk.org> | 2006-12-03 20:02:04 +0000 |
---|---|---|
committer | Kristian Rietveld <kristian@src.gnome.org> | 2006-12-03 20:02:04 +0000 |
commit | 817d667da8732c6e9baf9d0d846e611f2136a31d (patch) | |
tree | 6224756bf2874a381e28964b121adf7024a9ad74 /gtk/gtkcellrenderertext.c | |
parent | 44cac29d90b18af4b297db01d512450d9f7cc7fc (diff) | |
download | gtk+-817d667da8732c6e9baf9d0d846e611f2136a31d.tar.gz |
Make sure [xy]_offset are always being initialized, fix pixbuf renderer
2006-12-03 Kristian Rietveld <kris@gtk.org>
Make sure [xy]_offset are always being initialized, fix pixbuf
renderer padding. (#108235, Sven Neuman).
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_get_size),
(gtk_cell_renderer_pixbuf_render): add padding in _render instead
of _get_size.
* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_get_size):
always initialize [xy]_offset.
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_size): ditto.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_get_size):
ditto.
Diffstat (limited to 'gtk/gtkcellrenderertext.c')
-rw-r--r-- | gtk/gtkcellrenderertext.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index 34b4b6acd0..b3cf5e7f16 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -1585,6 +1585,11 @@ get_size (GtkCellRenderer *cell, *y_offset = MAX (*y_offset, 0); } } + else + { + if (x_offset) *x_offset = 0; + if (y_offset) *y_offset = 0; + } g_object_unref (layout); } |