gui/fading-label: Rewrite using PangoLayout directly

Instead of an internal label widget, store the text and the PangoLayout
directly, and only render them. Cache as much as possible to avoid
font reshaping.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/765>
This commit is contained in:
Georges Basile Stavracas Neto
2026-05-19 19:25:25 -03:00
parent 601acef508
commit f40c2cb0e9
3 changed files with 146 additions and 84 deletions
+4 -4
View File
@@ -54,7 +54,7 @@ template $GcalEventWidget: Widget {
}
Inscription {
text: bind summary_label.label;
text: bind summary_label.text;
hexpand: true;
vexpand: true;
xalign: 0.0;
@@ -68,13 +68,13 @@ template $GcalEventWidget: Widget {
spacing: 4;
$GcalFadingLabel summary_label {
label: bind template.event as <$GcalEvent>.summary;
text: bind template.event as <$GcalEvent>.summary;
hexpand: true;
vexpand: true;
}
Label timestamp_label {
halign: end;
hexpand: true;
vexpand: true;
styles [
"dimmed",