fix: align slider tracks with native thumb travel
This commit is contained in:
@@ -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.
|
- **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.
|
- **↑/↓:** 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.
|
- **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.
|
- **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.
|
- Click the right-hand time label to switch between total and remaining time. The titlebar pin keeps the window on top.
|
||||||
|
|||||||
@@ -378,7 +378,8 @@ private struct PlaybackSlider: NSViewRepresentable {
|
|||||||
final class Cell: NSSliderCell {
|
final class Cell: NSSliderCell {
|
||||||
var volume = false
|
var volume = false
|
||||||
override func drawBar(inside rect: NSRect, flipped: Bool) {
|
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()
|
NSColor.white.withAlphaComponent(0.12).setFill()
|
||||||
NSBezierPath(roundedRect: bar, xRadius: 1.5, yRadius: 1.5).fill()
|
NSBezierPath(roundedRect: bar, xRadius: 1.5, yRadius: 1.5).fill()
|
||||||
if volume {
|
if volume {
|
||||||
|
|||||||
Reference in New Issue
Block a user