From c18e0c2c7cff41272f049efcb525e33b2ec6217e Mon Sep 17 00:00:00 2001 From: ading2210 Date: Mon, 22 Jan 2024 18:53:49 +0000 Subject: [PATCH] reduce size of splash screen when animation is disabled --- src/main/splash.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/splash.ts b/src/main/splash.ts index 8b60895..7283455 100644 --- a/src/main/splash.ts +++ b/src/main/splash.ts @@ -12,6 +12,11 @@ import { ICON_PATH, VIEW_DIR } from "shared/paths"; import { Settings } from "./settings"; export function createSplashWindow(startMinimized = false) { + const { splashBackground, splashColor, splashTheming, disableSplashAnimation } = Settings.store; + + if (disableSplashAnimation) { + SplashProps.height = 150; + } const splash = new BrowserWindow({ ...SplashProps, icon: ICON_PATH, @@ -20,8 +25,6 @@ export function createSplashWindow(startMinimized = false) { splash.loadFile(join(VIEW_DIR, "splash.html")); - const { splashBackground, splashColor, splashTheming, disableSplashAnimation } = Settings.store; - if (splashTheming) { if (splashColor) { const semiTransparentSplashColor = splashColor.replace("rgb(", "rgba(").replace(")", ", 0.2)");