Conversation
1. Add focus indicator drawing in SliderProxyStyle::drawComplexControl 2. Draw rounded focus border using DPalette::Highlight when slider has keyboard focus (QStyle::State_HasFocus) 3. Recalculate square handle rect for RoundHandler style to align with the actual circular slider drawn by drawRoundSlider 4. Normal slider style remains unaffected by the change Influence: 1. Test slider keyboard focus indicator visibility in dock quick panel 2. Verify RoundHandler style focus border aligns with circular handle 3. Verify Normal style slider has no visual change without focus 4. Test focus indicator appears and disappears correctly with Tab key fix: 为滑块添加键盘焦点指示器 1. 在 SliderProxyStyle::drawComplexControl 中添加焦点指示器绘制 2. 当滑块获得键盘焦点时使用 DPalette::Highlight 绘制圆角焦点边框 3. RoundHandler 样式重新计算正方形 handle 区域与实际圆形滑块对齐 4. Normal 样式不受此变更影响 Influence: 1. 测试 dock 快捷面板中滑块键盘焦点指示器的可见性 2. 验证 RoundHandler 样式焦点边框与圆形滑块对齐 3. 验证 Normal 样式滑块在无焦点时无视觉变化 4. 测试 Tab 键切换时焦点指示器的显示和隐藏 PMS: BUG-341415
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe slider proxy style now renders a palette-highlight rounded focus ring around focused slider handles, with geometry adjusted for round handles to align with their actual circular rendering while preserving existing normal-slider behavior. Flow diagram for slider keyboard focus indicator renderingflowchart TD
A["SliderProxyStyle::drawComplexControl"] --> B{State_HasFocus}
B -->|No| C["drawNormalSlider or drawRoundSlider"]
B -->|Yes| D["Get DPalette::Highlight"]
D --> E{RoundHandler}
E -->|Yes| F["Recalculate square handle geometry"]
E -->|No| G["Use rectHandle geometry"]
F --> H["Expand geometry by margin 3"]
G --> H
H --> I["Draw rounded focus border"]
I --> J["Restore painter"]
C --> J
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
Author
|
修改不合理,dde-tray-loader 是正确的样式,问题出在dtk,应该在DTK中修复 |
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.
修复内容
修复 PMS BUG-341415:dock 快捷面板滑块缺少键盘焦点指示器。
变更说明
在
SliderProxyStyle::drawComplexControl方法中新增键盘焦点指示器绘制逻辑:QStyle::State_HasFocus)时,使用DPalette::Highlight颜色在 handle 周围绘制圆角焦点边框drawRoundSlider实际绘制的圆形滑块完全对齐关联信息
Summary by Sourcery
Add visible keyboard focus feedback for dock panel sliders.
Bug Fixes:
Enhancements: