ELECTRON
Electron 앱에서 dark모드 사용하기.
전념하자
2024. 10. 24. 15:26
반응형
Electron의 Main Process 모듈 중 nativeTheme을 사용하면 프로그램 프레임에 다크모드를 적용할 수 있다.
https://www.electronjs.org/docs/latest/api/native-theme
nativeTheme 모듈의 themSource 프로퍼티에 "system", "light" 또는 "dark"를 넣어주면 된다.
const {nativeTheme} = require("electron/main")
nativeTheme.themeSource = "dark"
반응형