Repository navigation
fix: restore DFloatingWidget border visibility in light theme - #797
Draft
tianming-1996 wants to merge 1 commit into
Draft
tianming-1996 wants to merge 1 commit into
tianming-1996 wants to merge 1 commit into
Conversation
Contributor
|
Skipping CI for Draft Pull Request. |
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tianming-1996 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 guide (collapsed on small PRs)Reviewer's GuideFixes DFloatingWidget border visibility by preserving the configured frame-shadow pen in the normal path and increasing animated border opacity to 30%, with changes limited to the CE_FloatingWidget rendering implementation. Flow diagram for DFloatingWidget border renderingflowchart TD
A[CE_FloatingWidget rendering] --> B{Animation active?}
B -- No --> C[Use frameShadowBorder pen]
C --> D[Draw rounded widget with visible border]
B -- Yes --> E[Draw rounded widget]
E --> F[Apply 30% opacity animation pen]
F --> G[Draw visible animated border]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
1. Root cause: line 1348 unconditionally set Qt::NoPen after the if-else block, overriding frameShadowBorder pen for non-animation path; animation-path alpha (~12%) too low for light theme 2. Fix: removed the NoPen override; raised animation-path border alpha to ~30% for visible borders in both themes 3. Impact: DFloatingWidget border renders correctly in both light and dark themes during static and animation states Log: Fix DFloatingWidget border invisible in light theme Influence: 1. Test DFloatingWidget border visibility in light and dark themes 2. Verify no regression in DFloatingWidget shadow rendering 3. Verify animation fade does not flicker with border enabled fix: 修复浅色主题下 DFloatingWidget 边框不可见 1. 根因:第 1348 行无条件 setPen(Qt::NoPen) 覆盖了 if-else 块 设置的 frameShadowBorder 画笔;动画路径 alpha(约 12%)过低 2. 方案:删除 NoPen 覆盖,恢复 if-else 画笔;动画路径边框 alpha 提升至约 30% 3. 影响:浅色与深色主题下边框在静态及动画状态均正常显示 Log: 修复浅色主题下浮动控件边框不可见问题 Influence: 1. 测试浅色与深色主题下 DFloatingWidget 边框可见性 2. 验证 DFloatingWidget 阴影绘制无回归 3. 验证动画渐变过程中边框无闪烁 PMS: BUG-249157
tianming-1996
force-pushed
the
fix/dfloatingwidget-border-249157
branch
from
October 29, 2026 21:02
1f88f5c to
bab50d5
Compare
This branch has not been deployed
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.
修复说明
问题
DFloatingWidget 边框在浅色主题下不可见。
根因
dstyle.cpp中drawControl(CE_FloatingWidget)的绘制路径存在一个无条件p->setPen(Qt::NoPen)调用(原第 1348 行),该调用在 if-else 块(第 1343-1346 行)设置frameShadowBorder()画笔之后执行,直接覆盖了画笔设置,导致:修复
p->setPen(Qt::NoPen)调用,恢复 if-else 块设置的frameShadowBorder()画笔影响
PMS: BUG-249157
Summary by Sourcery
Restore visible DFloatingWidget borders across static and animated rendering paths, particularly in the light theme.
Bug Fixes:
Chores: