forked from Shinonome/dots-hyprland
rename global state for sidebar open tracker
This commit is contained in:
@@ -8,8 +8,8 @@ pragma ComponentBehavior: Bound
|
|||||||
|
|
||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
property int sidebarLeftOpenCount: 0
|
property bool sidebarLeftOpen: false
|
||||||
property int sidebarRightOpenCount: 0
|
property bool sidebarRightOpen: false
|
||||||
property bool overviewOpen: false
|
property bool overviewOpen: false
|
||||||
property bool workspaceShowNumbers: false
|
property bool workspaceShowNumbers: false
|
||||||
property bool superReleaseMightTrigger: true
|
property bool superReleaseMightTrigger: true
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ Scope {
|
|||||||
|
|
||||||
// Layout.fillHeight: true
|
// Layout.fillHeight: true
|
||||||
radius: Appearance.rounding.full
|
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
|
implicitWidth: distroIcon.width + 5*2
|
||||||
implicitHeight: distroIcon.height + 5*2
|
implicitHeight: distroIcon.height + 5*2
|
||||||
|
|
||||||
@@ -301,7 +301,7 @@ Scope {
|
|||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
implicitWidth: indicatorsRowLayout.implicitWidth + 10*2
|
implicitWidth: indicatorsRowLayout.implicitWidth + 10*2
|
||||||
radius: Appearance.rounding.full
|
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 {
|
RowLayout {
|
||||||
id: indicatorsRowLayout
|
id: indicatorsRowLayout
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ Scope {
|
|||||||
Connections {
|
Connections {
|
||||||
target: Notifications
|
target: Notifications
|
||||||
function onNotify(notification) {
|
function onNotify(notification) {
|
||||||
if (GlobalStates.sidebarRightOpenCount > 0) {
|
if (GlobalStates.sidebarRightOpen) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// notificationRepeater.model = [notification, ...notificationRepeater.model]
|
// notificationRepeater.model = [notification, ...notificationRepeater.model]
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Scope { // Scope
|
|||||||
id: sidebarLoader
|
id: sidebarLoader
|
||||||
active: false
|
active: false
|
||||||
onActiveChanged: {
|
onActiveChanged: {
|
||||||
GlobalStates.sidebarLeftOpenCount += active ? 1 : -1
|
GlobalStates.sidebarLeftOpen = sidebarLoader.active
|
||||||
}
|
}
|
||||||
|
|
||||||
PanelWindow { // Window
|
PanelWindow { // Window
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Scope {
|
|||||||
id: sidebarLoader
|
id: sidebarLoader
|
||||||
active: false
|
active: false
|
||||||
onActiveChanged: {
|
onActiveChanged: {
|
||||||
GlobalStates.sidebarRightOpenCount += active ? 1 : -1
|
GlobalStates.sidebarRightOpen = sidebarLoader.active
|
||||||
}
|
}
|
||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
|
|||||||
Reference in New Issue
Block a user