fix: 修复4K 225%缩放下切换深色模式时插件面板图标偶现黑色(DDE-225) - #1723
MyLeeJiEun wants to merge 2 commits into
Conversation
Use a debounce QTimer (single-shot, interval=0) to coalesce color_theme_changed, theme_changed, and active_color_changed events into one atomic send. This eliminates the race condition where three separate Wayland events fired in the same event loop cycle caused intermittent icon rendering failures during dark mode switching on 4K/225% scaling. Replaces direct send calls in setDockColorTheme(), onThemeChanged(), and onActiveColorChanged() with scheduleThemeNotify().
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: MyLeeJiEun 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 |
Reviewer's GuideThe plugin manager now coalesces the three theme-related notifications and sends them atomically in one deferred update, reducing redraw races that can cause black plugin-panel icons under high-DPI fractional scaling during dark-mode transitions. Sequence diagram for coalesced plugin theme notificationsequenceDiagram
participant Theme as DPlatformTheme
participant Manager as PluginManager
participant Timer as QTimer
participant Surface as PluginSurface
Theme->>Manager: onThemeChanged()
Manager->>Manager: scheduleThemeNotify()
Theme->>Manager: onActiveColorChanged()
Manager->>Manager: scheduleThemeNotify()
Manager->>Timer: start()
Timer-->>Manager: timeout()
Manager->>Surface: send_color_theme_changed()
Manager->>Surface: send_theme_changed()
Manager->>Surface: send_active_color_changed()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Hi @MyLeeJiEun. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
TAG Bot New tag: 2.0.54 |
|
TAG Bot New tag: 2.0.55 |
|
TAG Bot New tag: 2.0.56 |
修复说明
4K 屏幕、225% 缩放下切换深色模式时,插件面板中图标偶现未切换成功、显示为黑色。
根因
主题切换时三路 Wayland 事件非原子化发送,触发多次重绘竞态;高 DPI 分数缩放下图标渲染时序问题导致图标偶现黑色。
修改内容
关联
Summary by Sourcery
确保插件面板在主题切换时及时且一致地刷新图标与颜色状态。
Bug Fixes:
Enhancements: