mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Fixes #43144
This commit is contained in:
parent
130981bce5
commit
8ed3513079
|
@ -188,6 +188,7 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
|
|||
this._disposables.push(this.editor.onDidLayoutChange((info: EditorLayoutInfo) => {
|
||||
const width = this._getWidth(info);
|
||||
this.domNode.style.width = width + 'px';
|
||||
this.domNode.style.left = this._getLeft(info) + 'px';
|
||||
this._onWidth(width);
|
||||
}));
|
||||
}
|
||||
|
@ -250,10 +251,18 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
|
|||
}
|
||||
}
|
||||
|
||||
private _getWidth(info: EditorLayoutInfo = this.editor.getLayoutInfo()): number {
|
||||
private _getWidth(info: EditorLayoutInfo): number {
|
||||
return info.width - info.minimapWidth - info.verticalScrollbarWidth;
|
||||
}
|
||||
|
||||
private _getLeft(info: EditorLayoutInfo): number {
|
||||
// If minimap is to the left, we move beyond it
|
||||
if (info.minimapWidth > 0 && info.minimapLeft === 0) {
|
||||
return info.minimapWidth;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private _onViewZoneTop(top: number): void {
|
||||
this.domNode.style.top = top + 'px';
|
||||
}
|
||||
|
@ -263,7 +272,8 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
|
|||
|
||||
let containerHeight = height - this._decoratingElementsHeight();
|
||||
this.container.style.height = `${containerHeight}px`;
|
||||
this._doLayout(containerHeight, this._getWidth());
|
||||
const layoutInfo = this.editor.getLayoutInfo();
|
||||
this._doLayout(containerHeight, this._getWidth(layoutInfo));
|
||||
|
||||
this._resizeSash.layout();
|
||||
}
|
||||
|
@ -328,8 +338,10 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
|
|||
column: where.startColumn
|
||||
};
|
||||
|
||||
const width = this._getWidth();
|
||||
const layoutInfo = this.editor.getLayoutInfo();
|
||||
const width = this._getWidth(layoutInfo);
|
||||
this.domNode.style.width = `${width}px`;
|
||||
this.domNode.style.left = this._getLeft(layoutInfo) + 'px';
|
||||
|
||||
// Render the widget as zone (rendering) and widget (lifecycle)
|
||||
const viewZoneDomNode = document.createElement('div');
|
||||
|
|
Loading…
Reference in a new issue