From d56867650ad043a82e72c2fba3c1da99bb74b169 Mon Sep 17 00:00:00 2001 From: Quang Lam Date: Sun, 10 May 2020 15:17:42 +0700 Subject: [PATCH] Allow showing title bar in menu bar mode on macOS (#249) --- public/libs/get-view-bounds.js | 2 +- src/components/dialog-preferences/index.js | 3 +-- src/components/main/index.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/public/libs/get-view-bounds.js b/public/libs/get-view-bounds.js index 9a188ff5..8cfaacf6 100644 --- a/public/libs/get-view-bounds.js +++ b/public/libs/get-view-bounds.js @@ -1,6 +1,6 @@ const getViewBounds = (contentSize, findInPage = false, height, width) => { const showSidebar = global.sidebar; - const showTitleBar = process.platform === 'darwin' && !global.attachToMenubar && global.titleBar; + const showTitleBar = process.platform === 'darwin' && global.titleBar; const showNavigationBar = (process.platform === 'linux' && global.attachToMenubar && !global.sidebar) || global.navigationBar; diff --git a/src/components/dialog-preferences/index.js b/src/components/dialog-preferences/index.js index d5b1272a..3923c798 100644 --- a/src/components/dialog-preferences/index.js +++ b/src/components/dialog-preferences/index.js @@ -387,8 +387,7 @@ const Preferences = ({ { requestSetPreference('titleBar', e.target.checked); requestRealignActiveWorkspace(); diff --git a/src/components/main/index.js b/src/components/main/index.js index 29c6c46f..503b2150 100644 --- a/src/components/main/index.js +++ b/src/components/main/index.js @@ -211,7 +211,7 @@ const Main = ({ workspaces, }) => { const workspacesList = getWorkspacesAsList(workspaces); - const showTitleBar = titleBar || (window.mode !== 'menubar' && !navigationBar && !sidebar); + const showTitleBar = window.process.platform === 'darwin' && titleBar; return (