summaryrefslogtreecommitdiff
path: root/bar
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-07-18 15:11:04 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-07-18 15:11:04 +0800
commit78f769cab0bda725cfe8c05692e091d9c4277cc3 (patch)
tree83675da30a1f7c56a1647539f9ee1799c49143e7 /bar
parentf86859075c06f1dd6fdaf5fb4ece43fcc31ad7c5 (diff)
timedate: better syntax for alt
Diffstat (limited to 'bar')
-rw-r--r--bar/TimeDate.qml13
1 files changed, 3 insertions, 10 deletions
diff --git a/bar/TimeDate.qml b/bar/TimeDate.qml
index b02cafb..cb01823 100644
--- a/bar/TimeDate.qml
+++ b/bar/TimeDate.qml
@@ -32,10 +32,8 @@ Item {
anchors.centerIn: parent
spacing: Bar.resourceIconTextSpacing
Loader {
- id: nonAlt
- active: !root.isAlt
- visible: !root.isAlt
- sourceComponent: Component {
+ sourceComponent: !root.isAlt ? main : alt
+ readonly property Component main: Component {
RowLayout {
Item {
Layout.fillWidth: true
@@ -86,12 +84,7 @@ Item {
}
}
}
- }
- Loader {
- id: alt
- active: root.isAlt
- visible: root.isAlt
- sourceComponent: Component {
+ readonly property Component alt: Component {
RowLayout {
Item {
Layout.fillWidth: true