set dark theme

This commit is contained in:
zhandouxiaojiji committed 2020-10-09 20:26:54 +08:00
1 parent d8cb328ac6
commit c10c6f3661
2 files changed
+6 -5

No files matched your search

+5 -4
View File
@@ -1,6 +1,7 @@
import { app, BrowserWindow, Menu, MenuItem, dialog } from 'electron';
import { app, BrowserWindow, Menu, MenuItem, dialog, nativeTheme } from 'electron';
let mainWindow: BrowserWindow = null;
nativeTheme.themeSource = 'dark';
let createWindow = function () {
mainWindow = new BrowserWindow({
width: 800,
@@ -10,9 +11,9 @@ let createWindow = function () {
}
// fullscreenable:false,
// maximizable:false
})
mainWindow.webContents.openDevTools()
mainWindow.loadFile('index.html')
});
mainWindow.webContents.openDevTools();
mainWindow.loadFile('index.html');
mainWindow.on('closed', function () {
mainWindow = null
})