Skip to content

Commit 95a2c37

Browse files
add-uos18202781743
authored andcommitted
fix(slider): adjust path calculation for handle alignment
When handleType is less 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-349793
1 parent efb8f50 commit 95a2c37

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

qt6/src/qml/Slider.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ T.Slider {
9999
startX: control.horizontal ? 0 : sliderGroove.width / 2
100100
startY: control.horizontal ? sliderGroove.height / 2 : sliderGroove.height
101101
PathLine {
102-
x: control.horizontal ? control.handle.x : sliderGroove.width / 2
102+
x: control.horizontal ? (control.handleType < 0 ? control.handle.x + control.handle.width : control.handle.x) : sliderGroove.width / 2
103103
y: control.horizontal ? sliderGroove.height / 2 : control.handle.y + control.handle.height / 2
104104
}
105105
}

0 commit comments

Comments
 (0)