@@ -131,6 +131,7 @@ interface IPreferencesProps {
131131 readonly showBranchNameInRepoList : ShowBranchNameInRepoListSetting
132132 readonly branchSortOrder : BranchSortOrder
133133 readonly hideWindowOnQuit : boolean
134+ readonly autoHideMenuBar : boolean
134135 readonly onEditGlobalGitConfig : ( ) => void
135136 readonly underlineLinks : boolean
136137 readonly showDiffCheckMarks : boolean
@@ -193,6 +194,7 @@ interface IPreferencesState {
193194 readonly showBranchNameInRepoList : ShowBranchNameInRepoListSetting
194195 readonly branchSortOrder : BranchSortOrder
195196 readonly hideWindowOnQuit : boolean
197+ readonly autoHideMenuBar : boolean
196198
197199 readonly initiallySelectedTheme : ApplicationTheme
198200 readonly initiallySelectedTabSize : number
@@ -283,6 +285,7 @@ export class Preferences extends React.Component<
283285 showBranchNameInRepoList : this . props . showBranchNameInRepoList ,
284286 branchSortOrder : this . props . branchSortOrder ,
285287 hideWindowOnQuit : this . props . hideWindowOnQuit ,
288+ autoHideMenuBar : this . props . autoHideMenuBar ,
286289 initiallySelectedTheme : this . props . selectedTheme ,
287290 initiallySelectedTabSize : this . props . selectedTabSize ,
288291 initiallySelectedDiffFontSize : this . props . selectedDiffFontSize ,
@@ -781,6 +784,7 @@ export class Preferences extends React.Component<
781784 useExternalCredentialHelper = { this . state . useExternalCredentialHelper }
782785 repositoryIndicatorsEnabled = { this . state . repositoryIndicatorsEnabled }
783786 hideWindowOnQuit = { this . state . hideWindowOnQuit }
787+ autoHideMenuBar = { this . state . autoHideMenuBar }
784788 onUseWindowsOpenSSHChanged = { this . onUseWindowsOpenSSHChanged }
785789 onOptOutofReportingChanged = { this . onOptOutofReportingChanged }
786790 onUseExternalCredentialHelperChanged = {
@@ -790,6 +794,7 @@ export class Preferences extends React.Component<
790794 this . onRepositoryIndicatorsEnabledChanged
791795 }
792796 onHideWindowOnQuitChanged = { this . onHideWindowOnQuitChanged }
797+ onAutoHideMenuBarChanged = { this . onAutoHideMenuBarChanged }
793798 />
794799 )
795800 break
@@ -829,6 +834,10 @@ export class Preferences extends React.Component<
829834 this . setState ( { hideWindowOnQuit } )
830835 }
831836
837+ private onAutoHideMenuBarChanged = ( autoHideMenuBar : boolean ) => {
838+ this . setState ( { autoHideMenuBar } )
839+ }
840+
832841 private onLockFileDeleted = ( ) => {
833842 this . setState ( { existingLockFilePath : undefined } )
834843 }
@@ -1176,6 +1185,10 @@ export class Preferences extends React.Component<
11761185 dispatcher . setHideWindowOnQuit ( this . state . hideWindowOnQuit )
11771186 }
11781187
1188+ if ( this . state . autoHideMenuBar !== this . props . autoHideMenuBar ) {
1189+ dispatcher . setAutoHideMenuBar ( this . state . autoHideMenuBar )
1190+ }
1191+
11791192 if ( this . state . hooksPreferencesDirty ) {
11801193 if ( this . state . enableGitHookEnv !== undefined ) {
11811194 setHooksEnvEnabled ( this . state . enableGitHookEnv )
0 commit comments