This commit is contained in:
Vendicated 2024-09-20 20:16:06 +02:00
parent 37db07807a
commit b94379f5bd
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -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();
}