提交 b5302edf 编写于 作者: D David Terry

menu bar: only notify about hide / show when changing settings (not when toggling fullscreen)

上级 727f4bbb
......@@ -647,10 +647,10 @@ export class VSCodeWindow implements IVSCodeWindow {
// respect configured menu bar visibility
const windowConfig = this.configurationService.getConfiguration<IWindowSettings>('window');
this.setMenuBarVisibility(windowConfig && windowConfig.menuBarVisibility);
this.setMenuBarVisibility(windowConfig && windowConfig.menuBarVisibility, false);
}
public setMenuBarVisibility(visibility: '' | 'visible' | 'toggle' | 'hidden'): void {
public setMenuBarVisibility(visibility: '' | 'visible' | 'toggle' | 'hidden', notify: boolean = true): void {
switch (visibility) {
case ('visible'): {
......@@ -662,7 +662,9 @@ export class VSCodeWindow implements IVSCodeWindow {
this.win.setMenuBarVisibility(false);
this.win.setAutoHideMenuBar(true);
this.send('vscode:showInfoMessage', nls.localize('hiddenMenuBar', "You can still access the menu bar by pressing the **Alt** key."));
if (notify) {
this.send('vscode:showInfoMessage', nls.localize('hiddenMenuBar', "You can still access the menu bar by pressing the **Alt** key."));
};
break;
}
case ('hidden'): {
......
......@@ -172,7 +172,7 @@ export class ToggleMenuBarAction extends Action {
static ID = 'workbench.action.toggleMenuBar';
static LABEL = nls.localize('toggleMenuBar', "Toggle Menu Bar");
private static menuBarVisibilityKey = 'window.menuBarVisibility'
private static menuBarVisibilityKey = 'window.menuBarVisibility';
constructor(
id: string,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册