diff --git a/js/ui.js b/js/ui.js index 8f4c3c6..0e12d30 100644 --- a/js/ui.js +++ b/js/ui.js @@ -1532,29 +1532,20 @@ export class UIRenderer { updateToggleButtonIcon(); if (isUIHidden) { - hideButton(); + showButton(); } else { showButton(); } }; - // Mouse move handler const handleMouseMove = (e) => { - const rect = overlay.getBoundingClientRect(); - const isNearTopRight = e.clientY < 100 && e.clientX > rect.width - 150; - - if (isUIHidden) { - if (overlay.classList.contains('is-video-mode')) { - if (isNearTopRight) { - showButton(); - } else { - hideButton(); - } - } else if (isNearTopRight) { - showButton(); - } else { - hideButton(); - } + if (!isUIHidden) return; + const btnRect = toggleBtn.getBoundingClientRect(); + const nearBtn = e.clientY < 100 && Math.abs(e.clientX - (btnRect.left + btnRect.width / 2)) < 150; + if (nearBtn) { + showButton(); + } else { + hideButton(); } }; diff --git a/styles.css b/styles.css index c8b20e5..b81d210 100644 --- a/styles.css +++ b/styles.css @@ -10224,6 +10224,20 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn { order: 1; } +#fullscreen-cover-overlay.ui-hidden .fullscreen-top-actions { + opacity: 1; + pointer-events: auto; + transform: none; +} + +#fullscreen-cover-overlay.ui-hidden .fullscreen-top-actions button, +#fullscreen-cover-overlay.ui-hidden .fullscreen-top-actions #close-fullscreen-cover-btn, +#fullscreen-cover-overlay.ui-hidden .fullscreen-top-actions #fs-visualizer-btn { + opacity: 1; + pointer-events: auto; + transform: none; +} + #fullscreen-cover-overlay #toggle-ui-btn { top: 1.25rem; left: calc(80px + 2.3rem + env(safe-area-inset-left));