mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
label: Another tweak to wrapping handling
This fixes a few reftests that were failing after the previous change because they ended up with x == -1.
This commit is contained in:
parent
09be7f65d5
commit
a51003661e
@ -1333,10 +1333,9 @@ get_layout_location (GtkLabel *self,
|
||||
xalign = 1.0 - xalign;
|
||||
|
||||
pango_layout_get_pixel_extents (self->layout, NULL, &logical);
|
||||
if (pango_layout_get_width (self->layout) > 0)
|
||||
x = floor ((xalign * (widget_width - logical.width)) - logical.x);
|
||||
if (x < 0)
|
||||
x = 0.f;
|
||||
else
|
||||
x = floor ((xalign * (widget_width - logical.width)) - logical.x);
|
||||
|
||||
baseline = gtk_widget_get_baseline (widget);
|
||||
if (baseline != -1)
|
||||
|
Loading…
Reference in New Issue
Block a user