Browse Source

Default titlebar for macos (#269)

* default titlebar for macos

* fix lint issue
master
zackslash 3 years ago
committed by GitHub
parent
commit
0a8f06d939
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/components/shared/setDefaultSettings.ts

7
src/components/shared/setDefaultSettings.ts

@ -1,6 +1,7 @@
import settings from 'electron-settings'; import settings from 'electron-settings';
import path from 'path'; import path from 'path';
import i18n from '../../i18n/i18n'; import i18n from '../../i18n/i18n';
import { isMacOS } from '../../shared/utils';
const setDefaultSettings = (force: boolean) => { const setDefaultSettings = (force: boolean) => {
if (force || !settings.hasSync('discord.enabled')) { if (force || !settings.hasSync('discord.enabled')) {
@ -96,7 +97,11 @@ const setDefaultSettings = (force: boolean) => {
} }
if (force || !settings.hasSync('titleBarStyle')) { if (force || !settings.hasSync('titleBarStyle')) {
settings.setSync('titleBarStyle', 'windows'); let defaultTitleBarStyle = 'windows';
if (isMacOS()) {
defaultTitleBarStyle = 'mac';
}
settings.setSync('titleBarStyle', defaultTitleBarStyle);
} }
if (force || !settings.hasSync('artistPageLegacy')) { if (force || !settings.hasSync('artistPageLegacy')) {

Loading…
Cancel
Save