mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Fix uninitialized width variable.
2007-01-04 Behdad Esfahbod <behdad@gnome.org> * gtk/gtklabel.c (get_layout_location): Fix uninitialized width variable. svn path=/trunk/; revision=17069
This commit is contained in:
parent
c0614d3aa8
commit
dcc2896f6d
@ -1,3 +1,8 @@
|
||||
2007-01-04 Behdad Esfahbod <behdad@gnome.org>
|
||||
|
||||
* gtk/gtklabel.c (get_layout_location): Fix uninitialized width
|
||||
variable.
|
||||
|
||||
2007-01-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/Makefile.am:
|
||||
|
@ -2298,11 +2298,11 @@ get_layout_location (GtkLabel *label,
|
||||
int width;
|
||||
PangoRectangle logical;
|
||||
|
||||
width = pango_layout_get_width (label->layout);
|
||||
pango_layout_get_pixel_extents (label->layout, NULL, &logical);
|
||||
|
||||
req_width = logical.width;
|
||||
if (width != -1)
|
||||
req_width = MIN(PANGO_PIXELS (width), req_width);
|
||||
/* width may be -1 */
|
||||
req_width = MIN(PANGO_PIXELS (width), logical.width);
|
||||
req_width += 2 * misc->xpad;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user