From 78f769cab0bda725cfe8c05692e091d9c4277cc3 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 18 Jul 2025 15:11:04 +0800 Subject: timedate: better syntax for alt --- bar/TimeDate.qml | 13 +++---------- 1 file 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 -- cgit v1.2.3