fix: align slider tracks with native thumb travel

This commit is contained in:
2026-10-10 17:05:59 +02:00
parent 9356ed8b4d
commit bdae024c7f
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -378,7 +378,8 @@ private struct PlaybackSlider: NSViewRepresentable {
final class Cell: NSSliderCell {
var volume = false
override func drawBar(inside rect: NSRect, flipped: Bool) {
let bar = NSRect(x: rect.minX, y: rect.midY - 1.5, width: rect.width, height: 3)
let bar = NSRect(x: rect.minX + knobThickness / 2, y: rect.midY - 1.5,
width: max(0, rect.width - knobThickness), height: 3)
NSColor.white.withAlphaComponent(0.12).setFill()
NSBezierPath(roundedRect: bar, xRadius: 1.5, yRadius: 1.5).fill()
if volume {