diff --git a/.config/quickshell/GlobalStates.qml b/.config/quickshell/GlobalStates.qml index 470dfc4f8..b9e3362a6 100644 --- a/.config/quickshell/GlobalStates.qml +++ b/.config/quickshell/GlobalStates.qml @@ -8,8 +8,8 @@ pragma ComponentBehavior: Bound Singleton { id: root - property int sidebarLeftOpenCount: 0 - property int sidebarRightOpenCount: 0 + property bool sidebarLeftOpen: false + property bool sidebarRightOpen: false property bool overviewOpen: false property bool workspaceShowNumbers: false property bool superReleaseMightTrigger: true diff --git a/.config/quickshell/modules/bar/Bar.qml b/.config/quickshell/modules/bar/Bar.qml index c3365dd0f..516fa8a32 100644 --- a/.config/quickshell/modules/bar/Bar.qml +++ b/.config/quickshell/modules/bar/Bar.qml @@ -127,7 +127,7 @@ Scope { // Layout.fillHeight: true radius: Appearance.rounding.full - color: (barLeftSideMouseArea.pressed || GlobalStates.sidebarLeftOpenCount > 0) ? Appearance.colors.colLayer1Active : barLeftSideMouseArea.hovered ? Appearance.colors.colLayer1Hover : "transparent" + color: (barLeftSideMouseArea.pressed || GlobalStates.sidebarLeftOpen) ? Appearance.colors.colLayer1Active : barLeftSideMouseArea.hovered ? Appearance.colors.colLayer1Hover : "transparent" implicitWidth: distroIcon.width + 5*2 implicitHeight: distroIcon.height + 5*2 @@ -301,7 +301,7 @@ Scope { Layout.fillHeight: true implicitWidth: indicatorsRowLayout.implicitWidth + 10*2 radius: Appearance.rounding.full - color: (barRightSideMouseArea.pressed || GlobalStates.sidebarRightOpenCount > 0) ? Appearance.colors.colLayer1Active : barRightSideMouseArea.hovered ? Appearance.colors.colLayer1Hover : "transparent" + color: (barRightSideMouseArea.pressed || GlobalStates.sidebarRightOpen) ? Appearance.colors.colLayer1Active : barRightSideMouseArea.hovered ? Appearance.colors.colLayer1Hover : "transparent" RowLayout { id: indicatorsRowLayout anchors.centerIn: parent diff --git a/.config/quickshell/modules/notificationPopup/NotificationPopup.qml b/.config/quickshell/modules/notificationPopup/NotificationPopup.qml index f970a09c6..79e855c2f 100644 --- a/.config/quickshell/modules/notificationPopup/NotificationPopup.qml +++ b/.config/quickshell/modules/notificationPopup/NotificationPopup.qml @@ -43,7 +43,7 @@ Scope { Connections { target: Notifications function onNotify(notification) { - if (GlobalStates.sidebarRightOpenCount > 0) { + if (GlobalStates.sidebarRightOpen) { return } // notificationRepeater.model = [notification, ...notificationRepeater.model] diff --git a/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml b/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml index 1a209e22f..20c1b79eb 100644 --- a/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml +++ b/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml @@ -21,7 +21,7 @@ Scope { // Scope id: sidebarLoader active: false onActiveChanged: { - GlobalStates.sidebarLeftOpenCount += active ? 1 : -1 + GlobalStates.sidebarLeftOpen = sidebarLoader.active } PanelWindow { // Window diff --git a/.config/quickshell/modules/sidebarRight/SidebarRight.qml b/.config/quickshell/modules/sidebarRight/SidebarRight.qml index f347b0698..8d9941847 100644 --- a/.config/quickshell/modules/sidebarRight/SidebarRight.qml +++ b/.config/quickshell/modules/sidebarRight/SidebarRight.qml @@ -21,7 +21,7 @@ Scope { id: sidebarLoader active: false onActiveChanged: { - GlobalStates.sidebarRightOpenCount += active ? 1 : -1 + GlobalStates.sidebarRightOpen = sidebarLoader.active } PanelWindow {