fix: delay enable taskmanager icon position animation#1526
Merged
BLumia merged 1 commit intolinuxdeepin:masterfrom Mar 24, 2026
Merged
fix: delay enable taskmanager icon position animation#1526BLumia merged 1 commit intolinuxdeepin:masterfrom
BLumia merged 1 commit intolinuxdeepin:masterfrom
Conversation
避免一开始就启用动画,导致新图标会有从初始位置(0)飞入的视觉效果 PMS: BUG-353933 Log:
Reviewer's guide (collapsed on small PRs)Reviewer's GuideDelays enabling position animations for task manager icons so that new icons don’t visually fly in from position 0, by gating x/y Behaviors behind a runtime flag that is turned on after component initialization. Sequence diagram for delayed enabling of taskmanager icon position animationsequenceDiagram
participant QMLRuntime
participant AppItemRect
participant Qt
participant Behaviors
QMLRuntime->>AppItemRect: Instantiate AppItemRect
AppItemRect->>AppItemRect: positionAnimationEnabled = false
AppItemRect->>Behaviors: Behaviors on x,y created (enabled = false)
QMLRuntime-->>AppItemRect: Component.onCompleted
AppItemRect->>Qt: Qt.callLater(callback)
Qt-->>AppItemRect: Invoke callback
AppItemRect->>AppItemRect: positionAnimationEnabled = true
AppItemRect->>Behaviors: enabled = true
QMLRuntime->>AppItemRect: Later change x,y (icon moves)
AppItemRect->>Behaviors: x,y changed with enabled = true
Behaviors->>AppItemRect: Animate x,y with NumberAnimation
Class diagram for TaskManager appItemRect QML objectclassDiagram
class AppItemRect {
bool positionAnimationEnabled
onCompleted()
onXBehavior()
onYBehavior()
}
class NumberAnimationX {
duration : int = 200
easingType : EasingType = OutCubic
}
class NumberAnimationY {
duration : int = 200
easingType : EasingType = OutCubic
}
AppItemRect "1" *-- "1" NumberAnimationX : Behavior_on_x
AppItemRect "1" *-- "1" NumberAnimationY : Behavior_on_y
class QtHelper {
callLater(callback)
}
AppItemRect ..> QtHelper : uses_callLater
AppItemRect : positionAnimationEnabled controls Behavior.enabled
NumberAnimationX : enabled depends_on AppItemRect.positionAnimationEnabled
NumberAnimationY : enabled depends_on AppItemRect.positionAnimationEnabled
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
wjyrich
approved these changes
Mar 24, 2026
Ivy233
approved these changes
Mar 24, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, Ivy233, wjyrich The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
避免一开始就启用动画,导致新图标会有从初始位置(0)飞入的视觉效果
PMS: BUG-353933
Summary by Sourcery
Bug Fixes: