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
|
||||
property bool hovered
|
||||
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 bool muted
|
||||
|
|
@ -39,7 +40,7 @@ Item {
|
|||
|
||||
states: State {
|
||||
name: "visible"
|
||||
when: root.visibilities.osd && Config.osd.enabled
|
||||
when: root.shouldBeActive
|
||||
|
||||
PropertyChanges {
|
||||
root.implicitWidth: content.implicitWidth
|
||||
|
|
@ -118,7 +119,7 @@ Item {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
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 {
|
||||
monitor: root.monitor
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Item {
|
|||
|
||||
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
|
||||
implicitHeight: 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue