summaryrefslogtreecommitdiffstats
path: root/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/index.ts b/src/index.ts
index 08e81a2a8..bb6d64d1e 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -101,7 +101,7 @@ const retrieveSettingValue = (key: string, defaultValue: boolean | string) =>
101 101
102const liftSingleInstanceLock = retrieveSettingValue( 102const liftSingleInstanceLock = retrieveSettingValue(
103 'liftSingleInstanceLock', 103 'liftSingleInstanceLock',
104 false, 104 DEFAULT_APP_SETTINGS.liftSingleInstanceLock,
105); 105);
106 106
107// Force single window 107// Force single window
@@ -165,7 +165,12 @@ if (
165} 165}
166 166
167// Disable GPU acceleration 167// Disable GPU acceleration
168if (!retrieveSettingValue('enableGPUAcceleration', false)) { 168if (
169 !retrieveSettingValue(
170 'enableGPUAcceleration',
171 DEFAULT_APP_SETTINGS.enableGPUAcceleration,
172 )
173) {
169 debug('Disable GPU Acceleration'); 174 debug('Disable GPU Acceleration');
170 app.disableHardwareAcceleration(); 175 app.disableHardwareAcceleration();
171} 176}
@@ -198,9 +203,15 @@ const createWindow = () => {
198 } 203 }
199 204
200 // Create the browser window. 205 // Create the browser window.
201 const backgroundColor = retrieveSettingValue('darkMode', false) 206 const backgroundColor = retrieveSettingValue(
207 'darkMode',
208 DEFAULT_APP_SETTINGS.darkMode,
209 )
202 ? '#1E1E1E' 210 ? '#1E1E1E'
203 : settings.get('accentColor'); 211 : (retrieveSettingValue(
212 'accentColor',
213 DEFAULT_APP_SETTINGS.accentColor,
214 ) as string);
204 215
205 mainWindow = new BrowserWindow({ 216 mainWindow = new BrowserWindow({
206 x: posX, 217 x: posX,
@@ -217,7 +228,7 @@ const createWindow = () => {
217 spellcheck: retrieveSettingValue( 228 spellcheck: retrieveSettingValue(
218 'enableSpellchecking', 229 'enableSpellchecking',
219 DEFAULT_APP_SETTINGS.enableSpellchecking, 230 DEFAULT_APP_SETTINGS.enableSpellchecking,
220 ) as boolean | undefined, 231 ) as boolean,
221 nodeIntegration: true, 232 nodeIntegration: true,
222 contextIsolation: false, 233 contextIsolation: false,
223 webviewTag: true, 234 webviewTag: true,