Skip to content

Commit

Permalink
fix: devtools font not work due to comment (#846)
Browse files Browse the repository at this point in the history
  • Loading branch information
cesaryuan authored Oct 10, 2024
1 parent 2663c11 commit ac09c71
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/main/src/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,13 @@ export function createWindow(
// Make it consistent with Chrome on Windows, instead of SimSun.
// ref: [[Feature Request]: Add possibility to change DevTools font · Issue #42055 · electron/electron](https://github.com/electron/electron/issues/42055)
window.webContents.on("devtools-opened", () => {
// source-code-font: For code such as Elements panel
// monospace-font: For sidebar such as Event Listener Panel
const css = `
:root {
--source-code-font-family: consolas; // For code such as Elements panel
--source-code-font-family: consolas;
--source-code-font-size: 13px;
--monospace-font-family: consolas; // For sidebar such as Event Listener Panel
--monospace-font-family: consolas;
--monospace-font-size: 13px;
}`
window.webContents.devToolsWebContents?.executeJavaScript(`
Expand Down

0 comments on commit ac09c71

Please sign in to comment.