From 9ccc5d6c0b946890454a2c540e5d32bd048a9724 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 16 Nov 2023 13:01:04 +0100 Subject: [PATCH] aux window - fix watermark positioning --- src/vs/workbench/browser/parts/editor/editorPart.ts | 10 +++++----- .../browser/parts/editor/media/editorgroupview.css | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 2fb1845bd6e3e..630db73810a5c 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -208,8 +208,8 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupsView { }); } - private _top = 0; - private _left = 0; + private top = 0; + private left = 0; private _contentDimension!: Dimension; get contentDimension(): Dimension { return this._contentDimension; } @@ -1292,8 +1292,8 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupsView { } override layout(width: number, height: number, top: number, left: number): void { - this._top = top; - this._left = left; + this.top = top; + this.left = left; // Layout contents const contentAreaSize = super.layoutContents(width, height).contentSize; @@ -1302,7 +1302,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupsView { this.doLayout(Dimension.lift(contentAreaSize), top, left); } - private doLayout(dimension: Dimension, top = this._top, left = this._left): void { + private doLayout(dimension: Dimension, top = this.top, left = this.left): void { this._contentDimension = dimension; // Layout Grid diff --git a/src/vs/workbench/browser/parts/editor/media/editorgroupview.css b/src/vs/workbench/browser/parts/editor/media/editorgroupview.css index 68757f6729c27..bb1d0f0deeed3 100644 --- a/src/vs/workbench/browser/parts/editor/media/editorgroupview.css +++ b/src/vs/workbench/browser/parts/editor/media/editorgroupview.css @@ -43,7 +43,8 @@ display: none; } -.monaco-workbench .part.editor > .content:not(.empty) .editor-group-container.empty > .editor-group-watermark { +.monaco-workbench .part.editor > .content:not(.empty) .editor-group-container.empty > .editor-group-watermark, +.monaco-workbench .part.editor > .content.auxiliary .editor-group-container.empty > .editor-group-watermark { max-width: 200px; height: calc(100% - 70px); } @@ -72,7 +73,7 @@ .monaco-workbench .part.editor > .content:not(.empty) .editor-group-container > .editor-group-watermark > .shortcuts, .monaco-workbench .part.editor > .content.auxiliary .editor-group-container > .editor-group-watermark > .shortcuts, - .monaco-workbench .part.editor > .content .editor-group-container.max-height-478px > .editor-group-watermark > .shortcuts { +.monaco-workbench .part.editor > .content .editor-group-container.max-height-478px > .editor-group-watermark > .shortcuts { display: none; }