workaround electron/electron#43367
This commit is contained in:
parent
37db07807a
commit
b94379f5bd
1 changed files with 12 additions and 0 deletions
|
@ -499,5 +499,17 @@ export async function createWindows() {
|
|||
});
|
||||
});
|
||||
|
||||
// evil hack to fix electron 32 regression that makes devtools always light theme
|
||||
// https://github.com/electron/electron/issues/43367
|
||||
// TODO: remove once fixed
|
||||
mainWin.webContents.on("devtools-opened", () => {
|
||||
if (!nativeTheme.shouldUseDarkColors) return;
|
||||
|
||||
nativeTheme.themeSource = "light";
|
||||
setTimeout(() => {
|
||||
nativeTheme.themeSource = "dark";
|
||||
}, 100);
|
||||
});
|
||||
|
||||
initArRPC();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue