add option to disable splash screen

This commit is contained in:
Vendicated 2025-02-06 05:16:32 +01:00
parent 6e1913cafc
commit 9905592b24
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
3 changed files with 19 additions and 5 deletions

View file

@ -486,16 +486,22 @@ export function loadUrl(uri: string | undefined) {
export async function createWindows() {
const startMinimized = process.argv.includes("--start-minimized");
const splash = createSplashWindow(startMinimized);
// SteamOS letterboxes and scales it terribly, so just full screen it
if (isDeckGameMode) splash.setFullScreen(true);
let splash: BrowserWindow | undefined;
if (Settings.store.enableSplashScreen !== false) {
splash = createSplashWindow(startMinimized);
// SteamOS letterboxes and scales it terribly, so just full screen it
if (isDeckGameMode) splash.setFullScreen(true);
}
await ensureVencordFiles();
runVencordMain();
mainWin = createMainWindow();
mainWin.webContents.on("did-finish-load", () => {
splash.destroy();
splash?.destroy();
if (!startMinimized) {
mainWin!.show();

View file

@ -60,11 +60,18 @@ const SettingsOptions: Record<string, Array<BooleanSetting | SettingsComponent>>
defaultValue: false,
disabled: () => Settings.store.customTitleBar ?? isWindows
},
{
key: "enableSplashScreen",
title: "Enable Splash Screen",
description: "Shows a small splash screen while Vesktop is loading",
defaultValue: true
},
{
key: "splashTheming",
title: "Splash theming",
description: "Adapt the splash window colors to your custom theme",
defaultValue: false
defaultValue: false,
disabled: () => Settings.store.enableSplashScreen === false
},
WindowsTransparencyControls
],

View file

@ -22,6 +22,7 @@ export interface Settings {
clickTrayToShowHide?: boolean;
customTitleBar?: boolean;
enableSplashScreen?: boolean;
splashTheming?: boolean;
splashColor?: string;
splashBackground?: string;