summaryrefslogtreecommitdiff
path: root/modules/osd
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-12 17:15:55 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-12 17:15:55 +1000
commitd06d8b870f8cd2cc15d891412a5129bfc6117e09 (patch)
treec80d9a7bbdccf7a58ee7ab1e91d010224f60168a /modules/osd
parentdashboard: persist state (diff)
downloadcaelestia-shell-d06d8b870f8cd2cc15d891412a5129bfc6117e09.tar.gz
caelestia-shell-d06d8b870f8cd2cc15d891412a5129bfc6117e09.tar.bz2
caelestia-shell-d06d8b870f8cd2cc15d891412a5129bfc6117e09.zip
osd: loader content
Diffstat (limited to 'modules/osd')
-rw-r--r--modules/osd/Content.qml3
-rw-r--r--modules/osd/Wrapper.qml15
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
+ }
}
}