From e06a3be7264c817b4e1acf1e661d83aed80c8f4d Mon Sep 17 00:00:00 2001 From: altrup <51763643+altrup@users.noreply.github.com> Date: Sun, 22 Mar 2026 23:38:21 -0400 Subject: [PATCH] Fix small visual bug when slider goes over divider --- .../quickshell/ii/modules/common/widgets/StyledSlider.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/common/widgets/StyledSlider.qml b/dots/.config/quickshell/ii/modules/common/widgets/StyledSlider.qml index 7df9701f4..b17afd86b 100644 --- a/dots/.config/quickshell/ii/modules/common/widgets/StyledSlider.qml +++ b/dots/.config/quickshell/ii/modules/common/widgets/StyledSlider.qml @@ -102,8 +102,9 @@ Slider { width: root.width implicitHeight: trackWidth property var normalized: root.dividerValues.map(v => (v - root.from) / (root.to - root.from)) - property var leftValues: [0, ...normalized.filter(v => v < root.visualPosition), root.visualPosition] - property var rightValues: [root.visualPosition, ...normalized.filter(v => v > root.visualPosition), 1] + property var filtered: normalized.filter(v => Math.abs(v - root.visualPosition) * effectiveDraggingWidth > handleMargins + handleWidth / 2 - dividerMargins) + property var leftValues: [0, ...filtered.filter(v => v < root.visualPosition), root.visualPosition] + property var rightValues: [root.visualPosition, ...filtered.filter(v => v > root.visualPosition), 1] property var leftWidths: leftValues.map((v, i, a) => a[i + 1] - v).slice(0, -1) property var rightWidths: rightValues.map((v, i, a) => a[i + 1] - v).slice(0, -1)