1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

dark mode flag

This commit is contained in:
Andrew Simachev 2021-03-07 10:59:59 +03:00
parent 33bb568275
commit b28555452f
4 changed files with 16 additions and 1 deletions

View file

@ -314,6 +314,10 @@ function createWindow () {
args.shift();
send.apply(this, args);
});
ipcMain.handle('dark-mode:system', () => {
nativeTheme.themeSource = 'system';
});
ipcMain.on('winCommand', (e, cmd) => {
switch (cmd) {
@ -498,6 +502,13 @@ function menuInit () {
});
};
flagMenu.push({
label: 'Dark mode', type: 'checkbox', checked: nativeTheme.shouldUseDarkColors,
click: () => {
nativeTheme.themeSource = !nativeTheme.shouldUseDarkColors ? 'dark' : 'light';
}
});
menuParam.push({
label: 'Debug',
submenu: [