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
+1
View File
@@ -24,6 +24,7 @@ Opening video fits the window to its display aspect ratio, including non-square
- **Space:** play/pause. **←/→:** seek five seconds. The timeline slider seeks on release and holds the requested position until the core finishes queued seeks; old playback snapshots cannot pull the thumb back.
- **↑/↓:** adjust volume by five percent. **M:** mute/unmute, restoring the previous audible level. The volume thumb is opaque light gray, independent of the frosted panel behind it.
- Both slider tracks span the native thumb-center travel range; the orange volume fill ends at the current thumb center.
- **Double-click video**, **F**, or **⌃⌘F:** toggle native fullscreen. **Esc:** leave fullscreen.
- **Single-click video:** hide controls. Mouse movement reveals them; they fade after 2.5 seconds, including while paused. Hovering the titlebar/controller, dragging, seeking, an inactive window, errors, or VoiceOver keep them visible.
- Click the right-hand time label to switch between total and remaining time. The titlebar pin keeps the window on top.
+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 {