feat: improve scrollbar animation and state management#536
Merged
Conversation
1. Added hideWidthDuration property to control scrollbar width animation timing 2. Implemented __calculateStateConditions function to centralize state logic 3. Replaced complex when conditions with state-based approach using __currentState 4. Added proper state change handlers for hovered, pressed, active and size properties 5. Enhanced hide transition with width animation before opacity fade 6. This improves scrollbar behavior consistency and reduces flickering during state changes feat: 改进滚动条动画和状态管理 1. 添加 hideWidthDuration 属性控制滚动条宽度动画时间 2. 实现 __calculateStateConditions 函数集中处理状态逻辑 3. 使用 __currentState 替换复杂的 when 条件,采用基于状态的方法 4. 为 hovered、pressed、active 和 size 属性添加适当的状态变化处理程序 5. 在隐藏过渡中添加宽度动画,在透明度淡出之前执行 6. 这提高了滚动条行为的一致性,减少了状态变化期间的闪烁问题 PMS: BUG-283687 BUG-325887
deepin-ci-robot
added a commit
to linuxdeepin/dtk6declarative
that referenced
this pull request
Oct 13, 2025
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#536
Contributor
deepin pr auto review我对这段代码审查如下:
改进建议:
readonly property int STATE_HIDE: 0
readonly property int STATE_NORMAL: 1
readonly property int STATE_HOVER: 2
readonly property int STATE_ACTIVE: 3总体而言,这次改进提高了代码的可维护性和可读性,同时保持了原有的功能不变。通过集中管理状态逻辑,使得代码更加健壮和易于理解。 |
18202781743
approved these changes
Oct 13, 2025
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, 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 |
18202781743
pushed a commit
to linuxdeepin/dtk6declarative
that referenced
this pull request
Oct 13, 2025
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#536
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.
feat: 改进滚动条动画和状态管理
PMS: BUG-283687 BUG-325887