mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 05:50:10 +00:00
inscription: Do not try to align layouts that have a proper width set
Pango knows where to put the text.
This commit is contained in:
parent
4927b6e625
commit
883011f252
@ -424,7 +424,10 @@ gtk_inscription_get_layout_location (GtkInscription *self,
|
||||
xalign = 1.0 - xalign;
|
||||
|
||||
pango_layout_get_pixel_extents (self->layout, NULL, &logical);
|
||||
x = floor ((xalign * (widget_width - logical.width)) - logical.x);
|
||||
if (pango_layout_get_width (self->layout) > 0)
|
||||
x = 0.f;
|
||||
else
|
||||
x = floor ((xalign * (widget_width - logical.width)) - logical.x);
|
||||
|
||||
baseline = gtk_widget_get_allocated_baseline (widget);
|
||||
if (baseline != -1)
|
||||
|
Loading…
Reference in New Issue
Block a user