Fix broken width computation, again.

2007-01-05  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtklabel.c (get_layout_location): Fix broken width computation,
        again.


svn path=/trunk/; revision=17083
This commit is contained in:
Behdad Esfahbod
2007-01-05 18:05:15 +00:00
committed by Behdad Esfahbod
parent 34039c7008
commit e4dc23c48e
2 changed files with 8 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
2007-01-05 Behdad Esfahbod <behdad@gnome.org>
* gtk/gtklabel.c (get_layout_location): Fix broken width computation,
again.
2007-01-05 Carlos Garnacho <carlosg@gnome.org>
* gtk/gtknotebook.c (gtk_notebook_size_request): take into account

View File

@@ -2301,8 +2301,9 @@ get_layout_location (GtkLabel *label,
width = pango_layout_get_width (label->layout);
pango_layout_get_pixel_extents (label->layout, NULL, &logical);
/* width may be -1 */
req_width = MIN(PANGO_PIXELS (width), logical.width);
req_width = logical.width;
if (width != -1)
req_width = MIN(PANGO_PIXELS (width), req_width);
req_width += 2 * misc->xpad;
}
else