mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 14:22:02 +00:00
Show macOS player controls on hover after auto-hide
When the pointer left the player window during playback, the auto-hide timer set the manual showControls override to false. The override takes precedence over hover state, so re-entering the window kept controls hidden until a click toggled them back. Clear a stale hide override on mouse activity so hovering reveals the controls again, except while the details panel is open, which keeps controls hidden on purpose.
This commit is contained in:
@@ -277,6 +277,13 @@ struct MacOSPlayerControlsView: View {
|
|||||||
switch phase {
|
switch phase {
|
||||||
case .active:
|
case .active:
|
||||||
isHovering = true
|
isHovering = true
|
||||||
|
// Mouse activity clears a hide override (e.g. left by the
|
||||||
|
// auto-hide timer after the pointer exited the window) so
|
||||||
|
// hovering shows controls again. Not while the details panel
|
||||||
|
// is open — that state keeps controls hidden on purpose.
|
||||||
|
if showControls == false && !isDetailsPanelVisible {
|
||||||
|
showControls = nil
|
||||||
|
}
|
||||||
resetHideTimer()
|
resetHideTimer()
|
||||||
case .ended:
|
case .ended:
|
||||||
isHovering = false
|
isHovering = false
|
||||||
|
|||||||
Reference in New Issue
Block a user