add option to disable the splash animation

This commit is contained in:
ading2210 2024-01-22 18:10:14 +00:00
parent cb33f1834b
commit 50d2b712d6
4 changed files with 10 additions and 8 deletions

View file

@ -20,7 +20,7 @@ export function createSplashWindow(startMinimized = false) {
splash.loadFile(join(VIEW_DIR, "splash.html"));
const { splashBackground, splashColor, splashTheming } = Settings.store;
const { splashBackground, splashColor, splashTheming, disableSplashAnimation } = Settings.store;
if (splashTheming) {
if (splashColor) {
@ -35,5 +35,9 @@ export function createSplashWindow(startMinimized = false) {
}
}
if (!disableSplashAnimation) {
splash.webContents.insertCSS(`img {display: block !important}`);
}
return splash;
}

View file

@ -49,6 +49,7 @@ export default function SettingsUi() {
["disableSmoothScroll", "Disable smooth scrolling", "Disables smooth scrolling in Vesktop", false],
["hardwareAcceleration", "Hardware Acceleration", "Enable hardware acceleration", true],
["splashTheming", "Splash theming", "Adapt the splash window colors to your custom theme", false],
["disableSplashAnimation", "Disable splash animation", "Disable the animation on the splash window", false],
[
"openLinksWithElectron",
"Open Links in app (experimental)",

View file

@ -28,6 +28,7 @@ export interface Settings {
checkUpdates?: boolean;
splashTheming?: boolean;
disableSplashAnimation?: boolean;
splashColor?: string;
splashBackground?: string;
}

View file

@ -26,18 +26,14 @@
width: 128px;
height: 128px;
image-rendering: pixelated;
display: none;
}
</style>
</head>
<body>
<div class="wrapper">
<img
draggable="false"
src="../shiggy.gif"
alt="shiggy"
role="presentation"
/>
<img draggable="false" src="../shiggy.gif" alt="shiggy" role="presentation" />
<p>Loading Vesktop...</p>
</div>
</body>