Skip to content

Commit ac09c71

Browse files
authored
fix: devtools font not work due to comment (#846)
1 parent 2663c11 commit ac09c71

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/main/src/window.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,13 @@ export function createWindow(
141141
// Make it consistent with Chrome on Windows, instead of SimSun.
142142
// ref: [[Feature Request]: Add possibility to change DevTools font · Issue #42055 · electron/electron](https://github.com/electron/electron/issues/42055)
143143
window.webContents.on("devtools-opened", () => {
144+
// source-code-font: For code such as Elements panel
145+
// monospace-font: For sidebar such as Event Listener Panel
144146
const css = `
145147
:root {
146-
--source-code-font-family: consolas; // For code such as Elements panel
148+
--source-code-font-family: consolas;
147149
--source-code-font-size: 13px;
148-
--monospace-font-family: consolas; // For sidebar such as Event Listener Panel
150+
--monospace-font-family: consolas;
149151
--monospace-font-size: 13px;
150152
}`
151153
window.webContents.devToolsWebContents?.executeJavaScript(`

0 commit comments

Comments
 (0)