mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 15:25:46 +00:00
fix(app): hide resize grips in native fullscreen on all platforms
Previously onResized only tracked fullscreen on Linux. Now all platforms
set isWindowFullscreen, and an initial check on mount catches windows
that start maximized/fullscreened. CSS: .app-shell[data-fullscreen] .resizer
{ display: none } added in layout.css (shipped with updater commit).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -88,9 +88,13 @@ function AppShell() {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!IS_LINUX) return;
|
|
||||||
const win = getCurrentWindow();
|
const win = getCurrentWindow();
|
||||||
|
// Check initial state (e.g. app launched maximised / already fullscreen).
|
||||||
|
win.isFullscreen().then(setIsWindowFullscreen).catch(() => {});
|
||||||
let unlisten: (() => void) | undefined;
|
let unlisten: (() => void) | undefined;
|
||||||
|
// onResized fires on every size change, including fullscreen enter/exit on
|
||||||
|
// all platforms. We re-query isFullscreen() rather than inferring from
|
||||||
|
// the size so the flag is always accurate regardless of platform quirks.
|
||||||
win.onResized(() => {
|
win.onResized(() => {
|
||||||
win.isFullscreen().then(setIsWindowFullscreen).catch(() => {});
|
win.isFullscreen().then(setIsWindowFullscreen).catch(() => {});
|
||||||
}).then(u => { unlisten = u; });
|
}).then(u => { unlisten = u; });
|
||||||
@@ -299,6 +303,7 @@ function AppShell() {
|
|||||||
data-mobile={isMobile || undefined}
|
data-mobile={isMobile || undefined}
|
||||||
data-mobile-player={isMobilePlayer || undefined}
|
data-mobile-player={isMobilePlayer || undefined}
|
||||||
data-titlebar={(IS_LINUX && useCustomTitlebar && !isWindowFullscreen && !isTilingWm) || undefined}
|
data-titlebar={(IS_LINUX && useCustomTitlebar && !isWindowFullscreen && !isTilingWm) || undefined}
|
||||||
|
data-fullscreen={isWindowFullscreen || undefined}
|
||||||
style={{
|
style={{
|
||||||
'--sidebar-width': isMobile ? '0px' : (isSidebarCollapsed ? '72px' : 'clamp(200px, 15vw, 220px)'),
|
'--sidebar-width': isMobile ? '0px' : (isSidebarCollapsed ? '72px' : 'clamp(200px, 15vw, 220px)'),
|
||||||
'--queue-width': isMobile ? '0px' : (isQueueVisible ? `${queueWidth}px` : '0px')
|
'--queue-width': isMobile ? '0px' : (isQueueVisible ? `${queueWidth}px` : '0px')
|
||||||
|
|||||||
Reference in New Issue
Block a user