Allow showing title bar in menu bar mode on macOS (#249)

This commit is contained in:
Quang Lam 2020-05-10 15:17:42 +07:00 committed by GitHub
parent ce7b938ea6
commit d56867650a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View file

@ -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;

View file

@ -387,8 +387,7 @@ const Preferences = ({
<Switch
edge="end"
color="primary"
checked={attachToMenubar ? false : titleBar}
disabled={attachToMenubar}
checked={titleBar}
onChange={(e) => {
requestSetPreference('titleBar', e.target.checked);
requestRealignActiveWorkspace();

View file

@ -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 (
<div className={classes.outerRoot}>