Skip to content

Commit

Permalink
perf(UI/SymbolItem): replace GtkLabel with GtkInscription
Browse files Browse the repository at this point in the history
Using GtkInscription instead of GtkLabel should be slightly more
performant, as it does not need to perform any size calculations.

Ref: https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/402
  • Loading branch information
FineFindus committed Sep 16, 2024
1 parent c369d47 commit 72655af
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions data/resources/ui/symbol-item.ui
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,23 @@
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="hexpand">true</property>
<child>
<object class="GtkLabel">
<property name="halign">GTK_ALIGN_START</property>
<property name="label" bind-source="SymbolItem" bind-property="package" bind-flags="sync-create"/>
<object class="GtkInscription">
<property name="text" bind-source="SymbolItem" bind-property="package" bind-flags="sync-create"/>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="halign">GTK_ALIGN_START</property>
<property name="label" bind-source="SymbolItem" bind-property="command" bind-flags="sync-create"/>
<object class="GtkInscription">
<property name="text" bind-source="SymbolItem" bind-property="command" bind-flags="sync-create"/>
<style>
<class name="title-3"/>
</style>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="halign">GTK_ALIGN_START</property>
<property name="label" bind-source="SymbolItem" bind-property="mode" bind-flags="sync-create"/>
<object class="GtkInscription">
<property name="text" bind-source="SymbolItem" bind-property="mode" bind-flags="sync-create"/>
<style>
<class name="caption"/>
</style>
Expand Down

0 comments on commit 72655af

Please sign in to comment.