diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-18 15:19:15 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-18 15:19:15 +1000 |
| commit | 85d575f6c18017693cb2f3ab07314a0cf43adbe6 (patch) | |
| tree | 89540859a71162c28c8419af49c75cc3634e6b70 /modules/utilities/Wrapper.qml | |
| parent | launcher: fix open anim (diff) | |
| download | caelestia-shell-85d575f6c18017693cb2f3ab07314a0cf43adbe6.tar.gz caelestia-shell-85d575f6c18017693cb2f3ab07314a0cf43adbe6.tar.bz2 caelestia-shell-85d575f6c18017693cb2f3ab07314a0cf43adbe6.zip | |
feat: add sidebar
WIP
Diffstat (limited to 'modules/utilities/Wrapper.qml')
| -rw-r--r-- | modules/utilities/Wrapper.qml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/utilities/Wrapper.qml b/modules/utilities/Wrapper.qml index 3f84319..a3ba53d 100644 --- a/modules/utilities/Wrapper.qml +++ b/modules/utilities/Wrapper.qml @@ -9,6 +9,8 @@ Item { id: root required property var visibilities + required property Item sidebar + readonly property PersistentProperties props: PersistentProperties { property bool recordingListExpanded: false property string recordingConfirmDelete @@ -16,10 +18,11 @@ Item { reloadableId: "utilities" } + readonly property bool shouldBeActive: visibilities.sidebar || (visibilities.utilities && Config.utilities.enabled) visible: height > 0 implicitHeight: 0 - implicitWidth: Config.utilities.sizes.width + implicitWidth: Math.max(sidebar.width, Config.utilities.sizes.width) onStateChanged: { if (state === "visible" && timer.running) { @@ -30,7 +33,7 @@ Item { states: State { name: "visible" - when: root.visibilities.utilities + when: root.shouldBeActive PropertyChanges { root.implicitHeight: content.implicitHeight + Appearance.padding.large * 2 @@ -67,7 +70,7 @@ Item { running: true interval: Appearance.anim.durations.extraLarge onTriggered: { - content.active = Qt.binding(() => (root.visibilities.utilities && Config.utilities.enabled) || root.visible); + content.active = Qt.binding(() => root.shouldBeActive || root.visible); content.visible = true; } } @@ -77,13 +80,13 @@ Item { anchors.top: parent.top anchors.left: parent.left - anchors.right: parent.right anchors.margins: Appearance.padding.large visible: false active: true sourceComponent: Content { + implicitWidth: Config.utilities.sizes.width - Appearance.padding.large * 2 props: root.props visibilities: root.visibilities } |