diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-12 17:15:55 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-12 17:15:55 +1000 |
| commit | d06d8b870f8cd2cc15d891412a5129bfc6117e09 (patch) | |
| tree | c80d9a7bbdccf7a58ee7ab1e91d010224f60168a /modules | |
| parent | dashboard: persist state (diff) | |
| download | caelestia-shell-d06d8b870f8cd2cc15d891412a5129bfc6117e09.tar.gz caelestia-shell-d06d8b870f8cd2cc15d891412a5129bfc6117e09.tar.bz2 caelestia-shell-d06d8b870f8cd2cc15d891412a5129bfc6117e09.zip | |
osd: loader content
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/osd/Content.qml | 3 | ||||
| -rw-r--r-- | modules/osd/Wrapper.qml | 15 |
2 files changed, 12 insertions, 6 deletions
diff --git a/modules/osd/Content.qml b/modules/osd/Content.qml index 6870a57..f2bb51c 100644 --- a/modules/osd/Content.qml +++ b/modules/osd/Content.qml @@ -14,9 +14,6 @@ Item { required property Brightness.Monitor monitor required property var visibilities - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - implicitWidth: layout.implicitWidth + Appearance.padding.large * 2 implicitHeight: layout.implicitHeight + Appearance.padding.large * 2 diff --git a/modules/osd/Wrapper.qml b/modules/osd/Wrapper.qml index 62d8c4f..d4fae76 100644 --- a/modules/osd/Wrapper.qml +++ b/modules/osd/Wrapper.qml @@ -1,3 +1,5 @@ +pragma ComponentBehavior: Bound + import qs.components import qs.services import qs.config @@ -46,10 +48,17 @@ Item { } ] - Content { + Loader { id: content - monitor: Brightness.getMonitorForScreen(root.screen) - visibilities: root.visibilities + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + + Component.onCompleted: active = Qt.binding(() => (root.visibilities.osd && Config.osd.enabled) || root.visible) + + sourceComponent: Content { + monitor: Brightness.getMonitorForScreen(root.screen) + visibilities: root.visibilities + } } } |