Skip to content

Commit 6c39fe9

Browse files
author
Hiram
committed
[optimize] window white screen
1 parent 870dde2 commit 6c39fe9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/core/winManger.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { is } from '@electron-toolkit/utils';
22
import remote from '@electron/remote/main';
3-
import { app, BrowserWindow, shell } from 'electron';
3+
import { app, BrowserWindow, nativeTheme, shell } from 'electron';
44
import electronLocalshortcut from 'electron-localshortcut';
55
import { join } from 'path';
66
import url from 'url';
@@ -67,6 +67,7 @@ const createMain = () => {
6767
y: db.status ? db.position.y : null,
6868
minWidth: 1000,
6969
minHeight: 640,
70+
backgroundColor: nativeTheme.shouldUseDarkColors ? '#000': '#fff',
7071
titleBarStyle: 'hiddenInset',
7172
show: false,
7273
frame: false,
@@ -152,6 +153,7 @@ const createPlay = () => {
152153
y: db.status ? db.position.y : null,
153154
minWidth: 480,
154155
minHeight: 280,
156+
backgroundColor: nativeTheme.shouldUseDarkColors ? '#000': '#fff',
155157
titleBarStyle: 'hiddenInset',
156158
show: false,
157159
frame: false,
@@ -244,6 +246,7 @@ const createLoad = () => {
244246
y: db.status ? db.position.y : null,
245247
minWidth: 1000,
246248
minHeight: 640,
249+
backgroundColor: nativeTheme.shouldUseDarkColors ? '#000': '#fff',
247250
titleBarStyle: 'hiddenInset',
248251
show: false,
249252
frame: false,

0 commit comments

Comments
 (0)