-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Prevent palette flickering during sidebar item expansion #2670
Conversation
Implement transparent palette handling during sidebar item expansion to prevent visual artifacts. Store the original palette and temporarily set a transparent background when expanding/collapsing items. Log: Improve sidebar view rendering stability Bug: https://pms.uniontech.com/bug-view-307543.html Bug: https://pms.uniontech.com/bug-view-307537.html
Reviewer's Guide by SourceryThis pull request addresses a visual flickering issue during sidebar item expansion by implementing transparent palette handling. The original palette is stored, a transparent background is applied during expansion/collapse, and the original palette is then restored. Sequence diagram for sidebar item expansion with transparent palettesequenceDiagram
participant SideBarView
participant SideBarViewPrivate
SideBarView->>SideBarView: onChangeExpandState(index, expand)
activate SideBarView
SideBarView->>SideBarViewPrivate: d->setTransparentPalette()
activate SideBarViewPrivate
SideBarViewPrivate->>SideBarView: setPalette(transparentPalette)
deactivate SideBarViewPrivate
SideBarView->>SideBarView: setExpanded(index, expand)
SideBarView->>SideBarViewPrivate: d->restorePalette()
activate SideBarViewPrivate
SideBarViewPrivate->>SideBarView: setPalette(originPalette)
deactivate SideBarViewPrivate
deactivate SideBarView
Updated class diagram for SideBarView and SideBarViewPrivateclassDiagram
class SideBarView{
+onChangeExpandState(index, expand)
}
class SideBarViewPrivate{
-QPalette originPalette
+setTransparentPalette()
+restorePalette()
-onItemDoubleClicked(index)
}
SideBarView -- SideBarViewPrivate: has a
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Johnson-zs The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Johnson-zs - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a comment explaining why a transparent palette is needed to prevent flickering.
- It might be more efficient to store and restore the base color of the palette instead of the entire palette.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Prevent UI flickering during sidebar expansion, improve Unicode sorting in file comparison, simplify file info creation and speedtimer management, ensure proper initialization, and replace abort() with Q_ASSERT_X for plugin loading failures. Log: tag 6.5.39
deepin pr auto review关键摘要:
是否建议立即修改:
|
TAG Bot TAG: 6.5.39 |
/forcemerge |
This pr force merged! (status: blocked) |
Implement transparent palette handling during sidebar item expansion to prevent visual artifacts. Store the original palette and temporarily set a transparent background when expanding/collapsing items.
Log: Improve sidebar view rendering stability
Bug: https://pms.uniontech.com/bug-view-307543.html
Bug: https://pms.uniontech.com/bug-view-307537.html
Summary by Sourcery
Implements transparent palette handling during sidebar item expansion and collapsing to prevent visual artifacts such as flickering. It stores the original palette and temporarily sets a transparent background when expanding/collapsing items.
Bug Fixes: