Skip to content

Commit 9ff9858

Browse files
committed
fix: delay enable taskmanager icon position animation
避免一开始就启用动画,导致新图标会有从初始位置(0)飞入的视觉效果 PMS: BUG-353933 Log:
1 parent ad86104 commit 9ff9858

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

panels/dock/taskmanager/package/TaskManager.qml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,26 +143,36 @@ ContainmentItem {
143143
// kept for debug purpose
144144
// border.color: "red"
145145
// border.width: 1
146+
id: appItemRect
146147
color: "transparent"
147148
parent: appContainer
148149
x: delegateRoot.x
149150
y: delegateRoot.y
150151
width: delegateRoot.width
151152
height: delegateRoot.height
152153
scale: delegateRoot.scale
154+
property bool positionAnimationEnabled: false
153155
Behavior on x {
156+
enabled: appItemRect.positionAnimationEnabled
154157
NumberAnimation {
155158
duration: 200
156159
easing.type: Easing.OutCubic
157160
}
158161
}
159162
Behavior on y {
163+
enabled: appItemRect.positionAnimationEnabled
160164
NumberAnimation {
161165
duration: 200
162166
easing.type: Easing.OutCubic
163167
}
164168
}
165169

170+
Component.onCompleted: {
171+
Qt.callLater(function() {
172+
appItemRect.positionAnimationEnabled = true
173+
})
174+
}
175+
166176
AppItem {
167177
id: appItem
168178
anchors.fill: parent // This is mandatory for draggable item center in drop area

0 commit comments

Comments
 (0)