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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user