From 2f2acc0c4f8c552d51c510ca2c5d61a52e340ab2 Mon Sep 17 00:00:00 2001 From: chenyuanbo Date: Thu, 7 May 2026 14:27:02 +0800 Subject: [PATCH] fix(slider): adjust path calculation for handle alignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When handleType is less than 0 and x-value more than 0, the x-coordinate calculation now includes the handle width offset to correct the visual alignment of the slider path. Log: adjust path calculation for handle alignment PMS: BUG-358623 Influence: 检查输入设备的反馈音量显示是否正确,同时关注静音场景(PMS:350837) --- qt6/src/qml/Slider.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt6/src/qml/Slider.qml b/qt6/src/qml/Slider.qml index 8a8ce8ec8..c09d9b5e7 100644 --- a/qt6/src/qml/Slider.qml +++ b/qt6/src/qml/Slider.qml @@ -100,7 +100,7 @@ T.Slider { startX: control.horizontal ? (control.alignToTicks ? __handle.width / 2 : 0) : sliderGroove.width / 2 startY: control.horizontal ? sliderGroove.height / 2 : sliderGroove.height PathLine { - x: control.horizontal ? control.handle.x : sliderGroove.width / 2 + x: control.horizontal ? ((control.handleType < 0 && control.handle.x > 0) ? control.handle.x + control.handle.width : control.handle.x) : sliderGroove.width / 2 y: control.horizontal ? sliderGroove.height / 2 : control.handle.y + control.handle.height / 2 } }