fix: reset icon scale when attention animation ends#1553
Merged
Conversation
1. Added onActiveChanged handler to reset icon.scale to 1.0 when attention animation becomes inactive 2. This prevents the icon from remaining scaled after attention animation completes 3. Fixes visual issue where icons could appear incorrectly scaled after attention animation Log: Fixed taskbar icon scaling issue after attention animation Influence: 1. Test applications that trigger attention requests (like incoming messages) 2. Verify that icons return to normal size after attention animation completes 3. Check that icon scaling works correctly during animation 4. Test with multiple attention animations in sequence 5. Verify no visual artifacts remain after animation fix: 修复注意力动画结束后图标缩放未重置的问题 1. 添加 onActiveChanged 处理器,在注意力动画变为非活动状态时将 icon.scale 重置为 1.0 2. 防止图标在注意力动画完成后保持缩放状态 3. 修复注意力动画后图标可能显示不正确缩放的问题 Log: 修复任务栏图标在注意力动画后的缩放问题 Influence: 1. 测试触发注意力请求的应用程序(如新消息通知) 2. 验证图标在注意力动画完成后是否恢复正常大小 3. 检查图标在动画期间的缩放是否正确 4. 测试连续多个注意力动画的情况 5. 验证动画后没有视觉残留问题
Reviewer's guide (collapsed on small PRs)Reviewer's GuideResets the taskbar app icon scale to its default when the attention animation stops being active to prevent persistent mis-scaling after the animation completes. Sequence diagram for attention animation icon scaling resetsequenceDiagram
actor User
participant App
participant TaskManager
participant AppItem
participant AttentionEffect as AttentionAnimation
participant Icon
User->>App: Trigger attention event (e.g. incoming message)
App->>TaskManager: Request attention for app window
TaskManager->>AppItem: Set attention flag to true
AppItem->>AttentionEffect: active = true
loop While active
AttentionEffect->>Icon: Apply scaling animation
end
TaskManager->>AppItem: Clear attention flag
AppItem->>AttentionEffect: active = false
AttentionEffect-->>AppItem: onActiveChanged triggered
AppItem->>Icon: icon.scale = 1.0
State diagram for icon scale during attention animationstateDiagram-v2
[*] --> Idle
Idle: Icon scale = 1.0
Idle --> AttentionActive: Attention requested
AttentionActive: Icon scale animated
AttentionActive --> Idle: Attention no longer active
note right of AttentionActive
onActiveChanged
if !active then icon.scale = 1.0
end note
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Since
icon.scalemay be changed elsewhere (e.g., hover/press effects), consider resetting to the previous or default scale via a dedicated state/behavior instead of hard-coding1.0inonActiveChangedto avoid conflicts with other animations.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since `icon.scale` may be changed elsewhere (e.g., hover/press effects), consider resetting to the previous or default scale via a dedicated state/behavior instead of hard-coding `1.0` in `onActiveChanged` to avoid conflicts with other animations.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
BLumia
approved these changes
Apr 14, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, 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.
Log: Fixed taskbar icon scaling issue after attention animation
Influence:
fix: 修复注意力动画结束后图标缩放未重置的问题
Log: 修复任务栏图标在注意力动画后的缩放问题
Influence:
Summary by Sourcery
Bug Fixes: