From 7b56a02815e33ff82efecba7db44afe3802f6347 Mon Sep 17 00:00:00 2001 From: zqq-dora Date: Mon, 16 Nov 2026 16:10:56 +0800 Subject: [PATCH] fix(slider): correct dash pattern spacing and groove shadow visibility - 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. --- qt6/src/qml/Slider.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qt6/src/qml/Slider.qml b/qt6/src/qml/Slider.qml index f0ca26ec..677d13dc 100644 --- a/qt6/src/qml/Slider.qml +++ b/qt6/src/qml/Slider.qml @@ -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 } } }