summaryrefslogtreecommitdiff
path: root/bar
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-07-26 16:21:03 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-07-26 16:21:03 +0800
commita5ac1ee77ae11a8d5728be8f910f54eba6a5f76c (patch)
tree95c7227f8f2a9f61734014b7043b97489bce5524 /bar
parenta675e7f09d8f6d5fef1686ee9415a0389fa73f98 (diff)
ws: unify handling resuming previous activerect context
fixes a problem where when exiting from inner to outter, the inner's onExit triggers before the outter's enter, making it attempt to resume then stopped by the outter's enter
Diffstat (limited to 'bar')
-rw-r--r--bar/Workspace.qml29
1 files changed, 15 insertions, 14 deletions
diff --git a/bar/Workspace.qml b/bar/Workspace.qml
index f8b8510..0de5c5b 100644
--- a/bar/Workspace.qml
+++ b/bar/Workspace.qml
@@ -78,12 +78,12 @@ Item {
easing.type: Easing.InOutQuad
}
}
- Behavior on implicitWidth {
- NumberAnimation {
- duration: Bar.workspaceAnimationDuration
- easing.type: Easing.InOutQuad
- }
- }
+ Behavior on implicitWidth {
+ NumberAnimation {
+ duration: Bar.workspaceAnimationDuration
+ easing.type: Easing.InOutQuad
+ }
+ }
}
RowLayout {
@@ -149,14 +149,15 @@ Item {
// }
onExited: {
root.toChild = false;
- if (!active && previousActiveIndex >= 0) {
- // just in case
- activeRect.x = layout.x + previousActiveIndex * Bar.workspaceIconSize + previousActiveIndex * Bar.workspaceSpacing;
- activeRect.implicitWidth = Bar.workspaceActiveIconSize;
- // root.activeOccupied = parent.st.isOccupied || false;
- root.activeOccupied = getWorkspaceStats(previousActiveIndex).isOccupied || false;
- previousActiveIndex = -1;
- }
+ // outer MouseArea will handle this
+ // if (!active && previousActiveIndex >= 0) {
+ // // just in case
+ // activeRect.x = layout.x + previousActiveIndex * Bar.workspaceIconSize + previousActiveIndex * Bar.workspaceSpacing;
+ // activeRect.implicitWidth = Bar.workspaceActiveIconSize;
+ // // root.activeOccupied = parent.st.isOccupied || false;
+ // root.activeOccupied = getWorkspaceStats(previousActiveIndex).isOccupied || false;
+ // previousActiveIndex = -1;
+ // }
}
onWheel: event => {
// no idea wats wrong w/ prev so we just unify it to use +/- 1