diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-26 16:21:03 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-26 16:21:03 +0800 |
| commit | a5ac1ee77ae11a8d5728be8f910f54eba6a5f76c (patch) | |
| tree | 95c7227f8f2a9f61734014b7043b97489bce5524 | |
| parent | a675e7f09d8f6d5fef1686ee9415a0389fa73f98 (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
| -rw-r--r-- | bar/Workspace.qml | 29 |
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 |
