Repository navigation
fix(slider): correct dash pattern spacing and groove shadow visibility - #754
Conversation
- Fix dash pattern from [1, 1] to [1, 0.5] to match design spec (2px dash, 1px gap). - Show highlight groove BoxShadow only in dark mode, hide in light mode.
Reviewer's GuideUICorrect the slider groove dash spacing and show its highlight shadow only in dark mode.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Hi @zqq-dora. 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. |
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="qt6/src/qml/Slider.qml" line_range="141" />
<code_context>
shadowColor: control.palette.highlight
rotation: control.horizontal ? 0 : 180
opacity: 0.25
+ visible: D.DTK.themeType === D.ApplicationHelper.DarkType
}
}
</code_context>
<issue_to_address>
**Light-theme sliders show shadow**
When the project is built with DTK5, uses a light theme, and `highlightedPassedGroove` is enabled, `src/qml/Slider.qml` leaves the highlighted-groove `BoxShadow` without a theme-dependent `visible` binding, so the shadow remains visible.
Add a theme-dependent `visible` binding to the highlighted-groove `BoxShadow` in `src/qml/Slider.qml`.
</issue_to_address>
### Comment 2
<location path="qt6/src/qml/Slider.qml" line_range="141" />
<code_context>
shadowColor: control.palette.highlight
rotation: control.horizontal ? 0 : 180
opacity: 0.25
+ visible: D.DTK.themeType === D.ApplicationHelper.DarkType
}
}
</code_context>
<issue_to_address>
**Window theme shows wrong shadow**
When a window’s theme is overridden independently of the application-wide theme, the visibility binding reads the application-wide theme instead of the slider’s `controlTheme`, so a light-themed window under a globally dark theme still shows the shadow.
Bind visibility to `control.D.ColorSelector.controlTheme === D.ApplicationHelper.DarkType` so it follows the slider’s effective theme.
</issue_to_address>| shadowColor: control.palette.highlight | ||
| rotation: control.horizontal ? 0 : 180 | ||
| opacity: 0.25 | ||
| visible: D.DTK.themeType === D.ApplicationHelper.DarkType |
There was a problem hiding this comment.
🟡 Medium · Light-theme sliders show shadow
When the project is built with DTK5, uses a light theme, and highlightedPassedGroove is enabled, src/qml/Slider.qml leaves the highlighted-groove BoxShadow without a theme-dependent visible binding, so the shadow remains visible.
Add a theme-dependent visible binding to the highlighted-groove BoxShadow in src/qml/Slider.qml.
Prompt for AI agents
In `qt6/src/qml/Slider.qml` at line 141:
**Light-theme sliders show shadow**
When the project is built with DTK5, uses a light theme, and `highlightedPassedGroove` is enabled, `src/qml/Slider.qml` leaves the highlighted-groove `BoxShadow` without a theme-dependent `visible` binding, so the shadow remains visible.
Add a theme-dependent `visible` binding to the highlighted-groove `BoxShadow` in `src/qml/Slider.qml`.| shadowColor: control.palette.highlight | ||
| rotation: control.horizontal ? 0 : 180 | ||
| opacity: 0.25 | ||
| visible: D.DTK.themeType === D.ApplicationHelper.DarkType |
There was a problem hiding this comment.
🟡 Medium · Window theme shows wrong shadow
When a window’s theme is overridden independently of the application-wide theme, the visibility binding reads the application-wide theme instead of the slider’s controlTheme, so a light-themed window under a globally dark theme still shows the shadow.
Bind visibility to control.D.ColorSelector.controlTheme === D.ApplicationHelper.DarkType so it follows the slider’s effective theme.
Prompt for AI agents
In `qt6/src/qml/Slider.qml` at line 141:
**Window theme shows wrong shadow**
When a window’s theme is overridden independently of the application-wide theme, the visibility binding reads the application-wide theme instead of the slider’s `controlTheme`, so a light-themed window under a globally dark theme still shows the shadow.
Bind visibility to `control.D.ColorSelector.controlTheme === D.ApplicationHelper.DarkType` so it follows the slider’s effective theme.|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, zqq-dora 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 |
46c4d01
into
linuxdeepin:v25-flowstyle

Follow-up fix to #750 for the slider dashed groove.
Changes
dashPatternfrom[1, 1]to[1, 0.5]. WithstrokeWidth: 2, this produces 2px dash / 1px gap, matching the design spec. The previous[1, 1]produced equal 2px / 2px, making the gap appear too wide.visible: D.DTK.themeType === D.ApplicationHelper.DarkTypeto theBoxShadow. The shadow is now only shown in dark mode, hidden in light mode.针对 #750 的 slider 虚线 groove 后续修复。
修改内容
dashPattern从[1, 1]改为[1, 0.5]。配合strokeWidth: 2,实际效果为 2px 线段 / 1px 间距,符合设计图规格。之前的[1, 1]产生 2px / 2px 等宽虚线,间距偏大。BoxShadow添加visible: D.DTK.themeType === D.ApplicationHelper.DarkType。投影仅在深色模式下显示,浅色模式隐藏。Summary by Sourcery
Correct slider groove dash spacing and theme-dependent shadow visibility.
Bug Fixes: