mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
remove special case of titlebar visibility change
This commit is contained in:
parent
c805ab792e
commit
81d1db9295
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue