Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Menubar now respects the AUTO_HIDE_MENU setting
Browse files Browse the repository at this point in the history
  • Loading branch information
bsclifton committed Sep 10, 2016
1 parent ac46ee2 commit 01989e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/components/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ class Main extends ImmutableComponent {
const loginRequiredDetail = activeFrame ? basicAuthState.getLoginRequiredDetail(this.props.appState, activeFrame.get('tabId')) : null

const menubarEnabled = isWindows
const menubarVisible = menubarEnabled && this.props.windowState.getIn(['ui', 'menubar', 'isVisible'])
const menubarVisible = menubarEnabled && (!getSetting(settings.AUTO_HIDE_MENU) || this.props.windowState.getIn(['ui', 'menubar', 'isVisible']))
const menubarTemplate = menubarVisible ? this.props.appState.getIn(['menu', 'template']) : null

const shouldAllowWindowDrag = !this.props.windowState.get('contextMenuDetail') &&
Expand Down
7 changes: 4 additions & 3 deletions js/stores/windowStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -777,9 +777,10 @@ const doAction = (action) => {
}
break
case WindowConstants.WINDOW_TOGGLE_MENUBAR_VISIBLE:
// BSCTODO: ignore if always show menu is enabled
const currentStatus = windowState.getIn(['ui', 'menubar', 'isVisible'])
windowState = windowState.setIn(['ui', 'menubar', 'isVisible'], !currentStatus)
if (getSetting(settings.AUTO_HIDE_MENU)) {
const currentStatus = windowState.getIn(['ui', 'menubar', 'isVisible'])
windowState = windowState.setIn(['ui', 'menubar', 'isVisible'], !currentStatus)
}
break

default:
Expand Down

0 comments on commit 01989e4

Please sign in to comment.