From 0a8f06d9390cedd1fa795b802dac87d2390579b5 Mon Sep 17 00:00:00 2001 From: zackslash Date: Fri, 18 Mar 2022 08:03:52 +0000 Subject: [PATCH] Default titlebar for macos (#269) * default titlebar for macos * fix lint issue --- src/components/shared/setDefaultSettings.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/shared/setDefaultSettings.ts b/src/components/shared/setDefaultSettings.ts index e9f4302..d49c355 100644 --- a/src/components/shared/setDefaultSettings.ts +++ b/src/components/shared/setDefaultSettings.ts @@ -1,6 +1,7 @@ import settings from 'electron-settings'; import path from 'path'; import i18n from '../../i18n/i18n'; +import { isMacOS } from '../../shared/utils'; const setDefaultSettings = (force: boolean) => { if (force || !settings.hasSync('discord.enabled')) { @@ -96,7 +97,11 @@ const setDefaultSettings = (force: boolean) => { } 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')) {