internal: make osd, session and utilities exclusive
Hide utilities when session open Hide osd when utilities open Prevents overlaps
This commit is contained in:
parent
16ce222ad7
commit
700a3504ca
2 changed files with 4 additions and 3 deletions
|
|
@ -13,6 +13,7 @@ Item {
|
||||||
required property var visibilities
|
required property var visibilities
|
||||||
property bool hovered
|
property bool hovered
|
||||||
readonly property Brightness.Monitor monitor: Brightness.getMonitorForScreen(root.screen)
|
readonly property Brightness.Monitor monitor: Brightness.getMonitorForScreen(root.screen)
|
||||||
|
readonly property bool shouldBeActive: visibilities.osd && Config.osd.enabled && !(visibilities.utilities && Config.utilities.enabled)
|
||||||
|
|
||||||
property real volume
|
property real volume
|
||||||
property bool muted
|
property bool muted
|
||||||
|
|
@ -39,7 +40,7 @@ Item {
|
||||||
|
|
||||||
states: State {
|
states: State {
|
||||||
name: "visible"
|
name: "visible"
|
||||||
when: root.visibilities.osd && Config.osd.enabled
|
when: root.shouldBeActive
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
root.implicitWidth: content.implicitWidth
|
root.implicitWidth: content.implicitWidth
|
||||||
|
|
@ -118,7 +119,7 @@ Item {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
||||||
Component.onCompleted: active = Qt.binding(() => (root.visibilities.osd && Config.osd.enabled) || root.visible)
|
Component.onCompleted: active = Qt.binding(() => root.shouldBeActive || root.visible)
|
||||||
|
|
||||||
sourceComponent: Content {
|
sourceComponent: Content {
|
||||||
monitor: root.monitor
|
monitor: root.monitor
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ Item {
|
||||||
|
|
||||||
reloadableId: "utilities"
|
reloadableId: "utilities"
|
||||||
}
|
}
|
||||||
readonly property bool shouldBeActive: visibilities.sidebar || (visibilities.utilities && Config.utilities.enabled)
|
readonly property bool shouldBeActive: visibilities.sidebar || (visibilities.utilities && Config.utilities.enabled && !(visibilities.session && Config.session.enabled))
|
||||||
|
|
||||||
visible: height > 0
|
visible: height > 0
|
||||||
implicitHeight: 0
|
implicitHeight: 0
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue