style: adjust folder icon animation durations#737
style: adjust folder icon animation durations#737deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the folder icon intro animation timings to use longer durations for scale and position transitions, aiming for smoother, more deliberate motion when icons animate into their grid positions. 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:
- Consider extracting the animation durations into shared constants or properties (e.g., on the root or a theme object) so they aren’t hardcoded in multiple NumberAnimation blocks and can be tuned consistently later.
- If the longer x/y duration compared to scale is intentional for a specific motion feel, it may be worth encoding that relationship (e.g., position duration derived from scale duration) to keep the timing proportions consistent if values change again.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider extracting the animation durations into shared constants or properties (e.g., on the root or a theme object) so they aren’t hardcoded in multiple NumberAnimation blocks and can be tuned consistently later.
- If the longer x/y duration compared to scale is intentional for a specific motion feel, it may be worth encoding that relationship (e.g., position duration derived from scale duration) to keep the timing proportions consistent if values change again.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy, 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 |
Changed animation durations for folder icon scaling and positioning to create smoother visual transitions. The scale animation duration increased from 400ms to 600ms, while the x and y position animations increased from 400ms to 800ms. This provides a more deliberate and polished feel when folder icons animate into their grid positions, enhancing the overall user experience with smoother motion. style: 调整文件夹图标动画持续时间 修改了文件夹图标缩放和定位的动画持续时间,以创建更平滑的视觉过渡。缩放动 画持续时间从400毫秒增加到600毫秒,而x和y位置动画从400毫秒增加到800毫秒。 这使得文件夹图标在动画进入网格位置时具有更从容和精致的感觉,通过更流畅的 运动提升了整体用户体验。
|
/forcemerge |
|
This pr force merged! (status: blocked) |
deepin pr auto review这段代码修改了 1. 代码逻辑审查
2. 代码质量
3. 代码性能
4. 代码安全
改进建议建议 1:统一动画时长如果希望图标的位置和缩放同时完成,建议将 // 统一为 800ms
NumberAnimation {
target: folderIcon
property: "scale"
from: folderIcon.introScale
to: (itemWidth / root.maxIconSizeInFolder) * root.iconScaleFactor
duration: 800 // 修改为与位置动画一致
easing.type: Easing.OutExpo
}或者,如果希望缩放快于移动(一种常见的“先到位后微调”的效果),目前的 600ms vs 800ms 是可行的,但需要确认这是预期的视觉效果。 建议 2:提取动画配置为了提高可维护性,可以在根组件或单例中定义动画时长。 // 在 Control 或根组件中定义
readonly property int folderAnimDuration: 800
readonly property int folderScaleDuration: 600 // 如果确实需要不同
// 在动画中使用
NumberAnimation {
// ...
duration: root.folderAnimDuration
// ...
}建议 3:使用 ParallelAnimation 明确意图如果这两个动画是紧密相关的,使用 ParallelAnimation {
NumberAnimation { target: folderIcon; property: "scale"; ...; duration: 800 }
NumberAnimation { target: folderIcon; property: "x"; ...; duration: 800 }
NumberAnimation { target: folderIcon; property: "y"; ...; duration: 800 }
}总结这段代码的修改主要是为了调整动画的节奏,使其更慢、更平滑。主要的改进点在于确认 |
Changed animation durations for folder icon scaling and positioning to create smoother visual transitions. The scale animation duration increased from 400ms to 600ms, while the x and y position animations increased from 400ms to 800ms. This provides a more deliberate and polished feel when folder icons animate into their grid positions, enhancing the overall user experience with smoother motion.
style: 调整文件夹图标动画持续时间
修改了文件夹图标缩放和定位的动画持续时间,以创建更平滑的视觉过渡。缩放动
画持续时间从400毫秒增加到600毫秒,而x和y位置动画从400毫秒增加到800毫秒。
这使得文件夹图标在动画进入网格位置时具有更从容和精致的感觉,通过更流畅的
运动提升了整体用户体验。
Summary by Sourcery
Adjust folder icon animation timing for smoother transitions when icons move into grid positions.
Enhancements: