My eyes are burning…
Upstream bug: [Bug][Regression][32-33]: Dark theme is not applied to Dev Tools · Issue #43367 · electron/electron · GitHub
I know this isn’t directly an Obsidian bug, but there is a hack/workaround that fixes it e.g. here . Since it’s typically long cycle between major bundled Electron updates, this might be worth looking into…
2 Likes
On Windows, I got dark mode …
Cheers, Marko
Possibly only affecting macOS/Linux. Would love others to confirm that.
ush
November 6, 2024, 1:37am
4
Im on mac and I also have this issue. Thanks for the info!
Win11, downloaded the v1.7.5 exe today, also have this issue. Try to patch following the solution provided in the original post. Thanks.
const { remote } = require('electron')
const devTheme = (webContents)=> {
const { nativeTheme } = remote
webContents.on('devtools-opened', ()=> {
nativeTheme.themeSource = 'light'
setTimeout(()=> {
nativeTheme.themeSource = 'dark' // or 'system'
}, 300)
})
}
const devtools = ()=> {
devTheme(remote.getCurrentWindow().webContents)
remote.app.on('web-contents-created', (createEvt, webContents)=> {
if (webContents.getType() == 'window') devTheme(webContents)
})
}
const ob = require('obsidian')
module.exports = class extends ob.Plugin {
onload() {
devtools()
}
onunload() {}
}
241107: fit when opening the devtools on new windows.
1 Like
On MacOS Sequoia 15.1, I also have this problem.
Moy
November 7, 2024, 1:27am
7
Actually on my Windows 11, the dev tool would also open as Light Theme - even I set it to Dark theme before:
My eyes, my eyes…!
Moy
November 7, 2024, 1:33am
8
Thank you for the patch!!
They’ve merged the fix upstream. It’s landing in Electron 35, fyi.
The fix for this was back ported and should be 1.7.7. you will need to download and reinstall obsidian.
1 Like
Confirmed, it’s fixed in 1.7.7. My eyes thank you.