mirror of
https://github.com/kremalicious/blowfish.git
synced 2024-11-15 01:25:22 +01:00
move to Electron 7.0.0 beta
* makes dark mode work on macOS Catalina
This commit is contained in:
parent
6797dd37f0
commit
e5306e7fba
@ -49,7 +49,7 @@
|
||||
"copy-webpack-plugin": "^5.0.4",
|
||||
"cross-env": "^6.0.3",
|
||||
"css-loader": "^3.2.0",
|
||||
"electron": "^6.0.11",
|
||||
"electron": "beta",
|
||||
"electron-builder": "^21.2.0",
|
||||
"electron-devtools-installer": "^2.2.4",
|
||||
"electron-store": "^5.0.0",
|
||||
|
@ -1,5 +1,11 @@
|
||||
const path = require('path')
|
||||
const { app, BrowserWindow, systemPreferences, ipcMain } = require('electron')
|
||||
const {
|
||||
app,
|
||||
BrowserWindow,
|
||||
systemPreferences,
|
||||
nativeTheme,
|
||||
ipcMain
|
||||
} = require('electron')
|
||||
const pkg = require('../../package.json')
|
||||
const buildMenu = require('./menu')
|
||||
const { buildTouchbar, updateTouchbar } = require('./touchbar')
|
||||
@ -21,7 +27,7 @@ const width = 640
|
||||
const height = 450
|
||||
|
||||
const createWindow = async () => {
|
||||
const isDarkMode = systemPreferences.isDarkMode()
|
||||
const isDarkMode = nativeTheme.shouldUseDarkColors
|
||||
|
||||
mainWindow = new BrowserWindow({
|
||||
width,
|
||||
@ -187,7 +193,7 @@ if (process.platform === 'windows') {
|
||||
//
|
||||
const switchTheme = () => {
|
||||
if (process.platform === 'darwin') {
|
||||
const isDarkMode = systemPreferences.isDarkMode()
|
||||
const isDarkMode = nativeTheme.shouldUseDarkColors
|
||||
|
||||
isDarkMode
|
||||
? mainWindow.webContents.executeJavaScript(
|
||||
|
@ -82,7 +82,7 @@ const buildMenu = mainWindow => {
|
||||
|
||||
if (process.platform === 'darwin') {
|
||||
template.unshift({
|
||||
label: app.getName(),
|
||||
label: app.name,
|
||||
submenu: [
|
||||
{
|
||||
role: 'about'
|
||||
|
Loading…
Reference in New Issue
Block a user