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:
parent
33bb568275
commit
b28555452f
4 changed files with 16 additions and 1 deletions
11
electron.js
11
electron.js
|
@ -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: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue