From: Kristian Rietveld Date: Thu, 31 May 2007 22:21:55 +0000 (+0000) Subject: transform the ink_rect using pango_extents_to_pixels to avoid rounding X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=5fc26ddab7c7e8d1abfd20a1b7cbc810f6ce3e10;p=~andy%2Fgtk transform the ink_rect using pango_extents_to_pixels to avoid rounding 2007-06-01 Kristian Rietveld * gtk/gtkcellrenderertext.c (get_size): transform the ink_rect using pango_extents_to_pixels to avoid rounding errors. (Fixes #430218, Shlomi Israel). svn path=/trunk/; revision=17996 --- diff --git a/ChangeLog b/ChangeLog index 00144048f..bf18258e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-06-01 Kristian Rietveld + + * gtk/gtkcellrenderertext.c (get_size): transform the ink_rect using + pango_extents_to_pixels to avoid rounding errors. (Fixes #430218, + Shlomi Israel). + 2007-05-31 Mathias Hasselmann * tests/autotestfilechooser.c: Reactivate the other file-chooser diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index 4a08f1c84..cad230b2c 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -1534,7 +1534,8 @@ get_size (GtkCellRenderer *cell, else layout = get_layout (celltext, widget, FALSE, 0); - pango_layout_get_pixel_extents (layout, NULL, &rect); + pango_layout_get_extents (layout, NULL, &rect); + pango_extents_to_pixels (&rect, NULL); if (height) *height = cell->ypad * 2 + rect.height;