mirror of
https://github.com/electron/electron.git
synced 2026-01-07 22:54:25 -05:00
feat: add APIs to support mojave dark modes (#14755)
* feat: add APIs to support mojave dark mode Closes #13387 * docs: fix system-prefs typo
This commit is contained in:
committed by
Charles Kerr
parent
8963529238
commit
0d2a0c7583
@@ -1,4 +1,4 @@
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
const { app, BrowserWindow, systemPreferences } = require('electron')
|
||||
const path = require('path')
|
||||
|
||||
let mainWindow = null
|
||||
@@ -11,6 +11,10 @@ app.on('window-all-closed', () => {
|
||||
exports.load = async (appUrl) => {
|
||||
await app.whenReady()
|
||||
|
||||
if (process.platform === 'darwin') {
|
||||
systemPreferences.startAppLevelAppearanceTrackingOS()
|
||||
}
|
||||
|
||||
const options = {
|
||||
width: 900,
|
||||
height: 600,
|
||||
|
||||
Reference in New Issue
Block a user