Load system theme for dark mode

This commit is contained in:
AkiraFukushima 2020-02-06 01:16:29 +09:00
parent 67c13c2a78
commit 1e710069f7
1 changed files with 7 additions and 1 deletions

View File

@ -12,7 +12,8 @@ import {
MenuItemConstructorOptions,
IpcMainEvent,
Notification,
NotificationConstructorOptions
NotificationConstructorOptions,
nativeTheme
} from 'electron'
import Datastore from 'nedb'
import { isEmpty } from 'lodash'
@ -214,6 +215,11 @@ async function createWindow() {
const language = await getLanguage()
i18next.changeLanguage(language)
/**
* Load system theme color for dark mode
*/
nativeTheme.themeSource = 'system'
/**
* Set application menu
*/