reduce size of splash screen when animation is disabled

This commit is contained in:
ading2210 2024-01-22 18:53:49 +00:00
parent 50d2b712d6
commit c18e0c2c7c

View file

@ -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)");