Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions panels/dock/taskmanager/package/AppItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ Item {

implicitWidth: appItem.implicitWidth

function syncIconPosition() {
fixPositionTimer.stop()
icon.fixPosition()
}

// Monitor Panel position changes to update icon geometry
Connections {
target: Panel.rootObject
Expand Down
35 changes: 15 additions & 20 deletions panels/dock/taskmanager/package/TaskManager.qml
Original file line number Diff line number Diff line change
Expand Up @@ -235,25 +235,24 @@ ContainmentItem {
width: delegateRoot.width
height: delegateRoot.height
readonly property bool hiddenByOverflow: delegateRoot.hiddenInOverflow
property real overflowTransitionScale: hiddenByOverflow ? 0.8 : 1.0
scale: delegateRoot.scale * overflowTransitionScale
opacity: hiddenByOverflow ? 0 : 1
scale: delegateRoot.scale * (hiddenByOverflow ? 0.8 : 1.0)
opacity: positionAnimationEnabled && !hiddenByOverflow ? 1 : 0
visible: opacity > 0.001
property bool positionAnimationEnabled: false

Behavior on opacity {
enabled: appItemRect.positionAnimationEnabled
NumberAnimation {
duration: 120
easing.type: Easing.OutCubic
}
onHiddenByOverflowChanged: {
positionAnimationEnabled = false
if (!hiddenByOverflow)
Qt.callLater(preparePosition)
}
Behavior on overflowTransitionScale {
enabled: appItemRect.positionAnimationEnabled
NumberAnimation {
duration: 120
easing.type: Easing.OutCubic
}

function preparePosition() {
if (hiddenByOverflow || !delegateRoot.ListView.view)
return
// Lay out and center the returning icon before revealing it.
delegateRoot.ListView.view.forceLayout()
appItem.syncIconPosition()
Comment thread
wjyrich marked this conversation as resolved.
Resolved
positionAnimationEnabled = true
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
Resolved
}

Behavior on x {
Expand All @@ -271,11 +270,7 @@ ContainmentItem {
}
}

Component.onCompleted: {
Qt.callLater(function() {
appItemRect.positionAnimationEnabled = true
})
}
Component.onCompleted: Qt.callLater(preparePosition)

AppItem {
Accessible.role: Accessible.ListItem
Expand Down
Loading