提交 81d1db92 编写于 作者: S SteVen Batten

remove special case of titlebar visibility change

上级 c805ab79
......@@ -84,9 +84,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
//#region Events
private readonly _onTitleBarVisibilityChange: Emitter<void> = this._register(new Emitter<void>());
readonly onTitleBarVisibilityChange: Event<void> = this._onTitleBarVisibilityChange.event;
private readonly _onZenModeChange: Emitter<boolean> = this._register(new Emitter<boolean>());
readonly onZenModeChange: Event<boolean> = this._onZenModeChange.event;
......@@ -268,8 +265,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
this.state.menuBar.toggled = visible;
if (this.state.fullscreen && (this.state.menuBar.visibility === 'toggle' || this.state.menuBar.visibility === 'default')) {
this._onTitleBarVisibilityChange.fire();
// Propagate to grid
this.workbenchGrid.setViewVisible(this.titleBarPartView, this.isVisible(Parts.TITLEBAR_PART));
......@@ -294,8 +289,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
// Changing fullscreen state of the window has an impact on custom title bar visibility, so we need to update
if (getTitleBarStyle(this.configurationService, this.environmentService) === 'custom') {
this._onTitleBarVisibilityChange.fire();
// Propagate to grid
this.workbenchGrid.setViewVisible(this.titleBarPartView, this.isVisible(Parts.TITLEBAR_PART));
......
......@@ -107,7 +107,7 @@ export class QuickOpenController extends Component implements IQuickOpenService
private registerListeners(): void {
this._register(this.configurationService.onDidChangeConfiguration(() => this.updateConfiguration()));
this._register(this.layoutService.onTitleBarVisibilityChange(() => this.positionQuickOpenWidget()));
this._register(this.layoutService.onPartVisibilityChange(() => this.positionQuickOpenWidget()));
this._register(browser.onDidChangeZoomLevel(() => this.positionQuickOpenWidget()));
this._register(this.layoutService.onLayout(dimension => this.layout(dimension)));
}
......
......@@ -176,7 +176,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution {
});
}));
this._register(this.layoutService.onTitleBarVisibilityChange(() => this.setYCoordinate()));
this._register(this.layoutService.onPartVisibilityChange(() => this.setYCoordinate()));
this._register(browser.onDidChangeZoomLevel(() => this.setYCoordinate()));
}
......
......@@ -31,11 +31,6 @@ export interface IWorkbenchLayoutService extends ILayoutService {
_serviceBrand: undefined;
/**
* Emits when the visibility of the title bar changes.
*/
readonly onTitleBarVisibilityChange: Event<void>;
/**
* Emits when the zen mode is enabled or disabled.
*/
......
......@@ -465,13 +465,8 @@ export class TestLayoutService implements IWorkbenchLayoutService {
onPartVisibilityChange: Event<void> = Event.None;
onLayout = Event.None;
private readonly _onTitleBarVisibilityChange = new Emitter<void>();
private readonly _onMenubarVisibilityChange = new Emitter<Dimension>();
public get onTitleBarVisibilityChange(): Event<void> {
return this._onTitleBarVisibilityChange.event;
}
public get onMenubarVisibilityChange(): Event<Dimension> {
return this._onMenubarVisibilityChange.event;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册