Skip to content

Commit b94379f

Browse files
committed
1 parent 37db078 commit b94379f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/mainWindow.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,5 +499,17 @@ export async function createWindows() {
499499
});
500500
});
501501

502+
// evil hack to fix electron 32 regression that makes devtools always light theme
503+
// https://github.com/electron/electron/issues/43367
504+
// TODO: remove once fixed
505+
mainWin.webContents.on("devtools-opened", () => {
506+
if (!nativeTheme.shouldUseDarkColors) return;
507+
508+
nativeTheme.themeSource = "light";
509+
setTimeout(() => {
510+
nativeTheme.themeSource = "dark";
511+
}, 100);
512+
});
513+
502514
initArRPC();
503515
}

0 commit comments

Comments
 (0)