projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7c8b37
)
inscription: Fixate layout at top when it doesn't fit
author
Benjamin Otte
<otte@redhat.com>
Sat, 11 Jun 2022 14:28:27 +0000
(16:28 +0200)
committer
Benjamin Otte
<otte@redhat.com>
Sat, 11 Jun 2022 14:28:27 +0000
(16:28 +0200)
Ellipsized and clipped layouts shouldn't reposition themselves according
to yalign when they don't fully fit.
gtk/gtkinscription.c
patch
|
blob
|
history
diff --git
a/gtk/gtkinscription.c
b/gtk/gtkinscription.c
index 155f334ad80a13a26fe29a1c7d90fe4021474b55..6a2260027ac6e8a1e72b0ac97534abab1045e21e 100644
(file)
--- a/
gtk/gtkinscription.c
+++ b/
gtk/gtkinscription.c
@@
-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;