aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/Page.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-14 19:51:32 +0200
committerDanilo M. <danix@danix.xyz>2026-09-14 19:51:32 +0200
commit25e28ce76d1fdfbca56ac0a54bb873510e5c029d (patch)
tree4f5ac9a7220898ad179f2c91d3dd8a4c6be9fc0b /desktop/Page.qml
parent1c2da6975fead84cf3e8e23356d9e364c08ee467 (diff)
downloadquickshell-25e28ce76d1fdfbca56ac0a54bb873510e5c029d.tar.gz
quickshell-25e28ce76d1fdfbca56ac0a54bb873510e5c029d.zip
feat(desktop): show the module glyph in every page title
Page.qml gains an icon rendered before the title, and the drawer binds it to the loaded module's icon so a module whose glyph changes (network follows the active link) keeps the header in step.
Diffstat (limited to 'desktop/Page.qml')
-rw-r--r--desktop/Page.qml21
1 files changed, 17 insertions, 4 deletions
diff --git a/desktop/Page.qml b/desktop/Page.qml
index 1bf312c..4ef50c1 100644
--- a/desktop/Page.qml
+++ b/desktop/Page.qml
@@ -16,6 +16,8 @@ Item {
id: page
property string title: ""
+ // The module's tile glyph, set by the drawer, shown before the title.
+ property string icon: ""
default property alias content: holder.data
signal back
@@ -46,11 +48,22 @@ Item {
}
}
- Text {
+ Row {
anchors { left: backBtn.right; leftMargin: 10; verticalCenter: parent.verticalCenter }
- text: page.title
- font { family: Theme.fontFamily; pixelSize: Theme.fontSize + 2; bold: true }
- color: Theme.text
+ spacing: 8
+
+ Text {
+ visible: page.icon !== ""
+ text: page.icon
+ font { family: Theme.iconFamily; pixelSize: Theme.fontSize + 2 }
+ color: Theme.text
+ }
+
+ Text {
+ text: page.title
+ font { family: Theme.fontFamily; pixelSize: Theme.fontSize + 2; bold: true }
+ color: Theme.text
+ }
}
}