smooth window startup color transition for the dark theme

pull/1267/head
antelle 2019-09-08 15:11:41 +02:00
parent a7f769d4f6
commit 7977bbf6e1
1 changed files with 4 additions and 3 deletions

View File

@ -157,15 +157,16 @@ function setSystemAppearance() {
}
function createMainWindow() {
const appSettings = readAppSettings();
const appSettings = readAppSettings() || {};
const isMacDarkTheme = appSettings.theme === 'macdark';
const windowOptions = {
show: false,
width: 1000,
height: 700,
minWidth: 700,
minHeight: 400,
titleBarStyle: appSettings ? appSettings.titlebarStyle : undefined,
backgroundColor: '#282C34',
titleBarStyle: appSettings.titlebarStyle,
backgroundColor: isMacDarkTheme ? '#1F1F20' : '#282C34',
webPreferences: {
backgroundThrottling: false,
nodeIntegration: true,