Repository navigation
fix(slider): correct dash pattern spacing and groove shadow visibility #754
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,8 +25,9 @@ T.Slider { | |
|
|
||
| property alias handleType: __handle.type | ||
| property real dashOffset: 0.0 | ||
| // Dash length matches the logical stroke width, producing square blocks. | ||
| property var dashPattern: [1, 1] | ||
| // Design spec: 2px dash, 1px gap. Pattern values are in strokeWidth units (2), | ||
| // so 1.0 -> 2px dash, 0.5 -> 1px gap. | ||
| property var dashPattern: [1, 0.5] | ||
| property bool highlightedPassedGroove: false | ||
| property bool alignToTicks: false | ||
|
|
||
|
|
@@ -137,6 +138,7 @@ T.Slider { | |
| 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 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 Bind visibility to Prompt for AI agentsIn `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. |
||
| } | ||
| } | ||
| } | ||
|
|
||
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.
🟡 Medium · Light-theme sliders show shadow
When the project is built with DTK5, uses a light theme, and
highlightedPassedGrooveis enabled,src/qml/Slider.qmlleaves the highlighted-grooveBoxShadowwithout a theme-dependentvisiblebinding, so the shadow remains visible.Add a theme-dependent
visiblebinding to the highlighted-grooveBoxShadowinsrc/qml/Slider.qml.Prompt for AI agents