]> Pileus Git - ~andy/gtk/commitdiff
transform the ink_rect using pango_extents_to_pixels to avoid rounding
authorKristian Rietveld <kris@gtk.org>
Thu, 31 May 2007 22:21:55 +0000 (22:21 +0000)
committerKristian Rietveld <kristian@src.gnome.org>
Thu, 31 May 2007 22:21:55 +0000 (22:21 +0000)
2007-06-01  Kristian Rietveld  <kris@gtk.org>

* 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

ChangeLog
gtk/gtkcellrenderertext.c

index 00144048f40a81ca10f42066c70df4b2de60374c..bf18258e31388646d0ede1fcf2f68b48ad4137aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-01  Kristian Rietveld  <kris@gtk.org>
+
+       * 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  <mathias.hasselmann@gmx.de>
 
        * tests/autotestfilechooser.c: Reactivate the other file-chooser
index 4a08f1c84be856970c41d2689fa15af1ce48ba66..cad230b2c149acf119b863590f9ad6e7e4c825bd 100644 (file)
@@ -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;