transform the ink_rect using pango_extents_to_pixels to avoid rounding

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
This commit is contained in:
Kristian Rietveld 2007-05-31 22:21:55 +00:00 committed by Kristian Rietveld
parent e53cc5ddfc
commit 5fc26ddab7
2 changed files with 8 additions and 1 deletions

View File

@ -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

View 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;