inscription: Fixate layout at top when it doesn't fit

Ellipsized and clipped layouts shouldn't reposition themselves according
to yalign when they don't fully fit.
This commit is contained in:
Benjamin Otte
2022-06-11 16:28:27 +02:00
parent c7c8b37e4c
commit 393ef4d0a2

View File

@@ -395,9 +395,15 @@ gtk_inscription_get_layout_location (GtkInscription *self,
/* yalign is 0 because we can't support yalign while baseline aligning */
y = baseline - layout_baseline;
}
else if (pango_layout_is_ellipsized (self->layout))
{
y = 0.f;
}
else
{
y = floor ((widget_height - logical.height) * self->yalign);
if (y < 0)
y = 0.f;
}
*x_out = x;