mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
Fix small visual bug when slider goes over divider
This commit is contained in:
@@ -102,8 +102,9 @@ Slider {
|
|||||||
width: root.width
|
width: root.width
|
||||||
implicitHeight: trackWidth
|
implicitHeight: trackWidth
|
||||||
property var normalized: root.dividerValues.map(v => (v - root.from) / (root.to - root.from))
|
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 filtered: normalized.filter(v => Math.abs(v - root.visualPosition) * effectiveDraggingWidth > handleMargins + handleWidth / 2 - dividerMargins)
|
||||||
property var rightValues: [root.visualPosition, ...normalized.filter(v => v > root.visualPosition), 1]
|
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 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)
|
property var rightWidths: rightValues.map((v, i, a) => a[i + 1] - v).slice(0, -1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user