feat(macos): support start in fullscreen setting

close #1200
This commit is contained in:
edde746
2026-05-30 23:58:38 +02:00
parent 9825ce3c7c
commit 0bb085c70c
2 changed files with 5 additions and 9 deletions
+4 -4
View File
@@ -228,10 +228,10 @@ Future<void> _bootstrapApp() async {
FullscreenStateManager().startMonitoring();
// Apply "start in fullscreen" preference on Windows/Linux. macOS is
// excluded — its native fullscreen animation is awkward at launch and
// the OS already restores window state.
if ((Platform.isWindows || Platform.isLinux) && settings.read(SettingsService.startInFullscreen)) {
// Apply "start in fullscreen" preference on desktop. macOS does not restore
// fullscreen state on its own (frame autosave only persists windowed geometry),
// so it needs the same explicit handling as Windows/Linux.
if (PlatformDetector.isDesktopOS() && settings.read(SettingsService.startInFullscreen)) {
unawaited(FullscreenStateManager().enterFullscreen());
}
@@ -115,7 +115,7 @@ class AppearanceSettingsScreen extends StatelessWidget {
subtitle: t.settings.showUnwatchedCountDescription,
),
if (Platform.isWindows || Platform.isLinux) ...[
if (PlatformDetector.isDesktopOS()) ...[
SettingsSectionHeader(t.settings.window),
SettingSwitchTile(
pref: SettingsService.startInFullscreen,
@@ -123,10 +123,6 @@ class AppearanceSettingsScreen extends StatelessWidget {
title: t.settings.startInFullscreen,
subtitle: t.settings.startInFullscreenDescription,
),
],
if (PlatformDetector.isDesktopOS()) ...[
if (!(Platform.isWindows || Platform.isLinux)) SettingsSectionHeader(t.settings.window),
SettingSwitchTile(
pref: SettingsService.exitFullscreenOnPlayerClose,
icon: Symbols.fullscreen_exit_rounded,