|
| 1 | +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | +From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= <loic@coderpad.io> |
| 3 | +Date: Fri, 10 Oct 2025 16:48:18 +0200 |
| 4 | +Subject: [PATCH] fix: remove empty layout message before actual view layout |
| 5 | + |
| 6 | +to prevent a flicker when it opens |
| 7 | +--- |
| 8 | + src/vs/workbench/browser/parts/paneCompositePart.ts | 7 +++---- |
| 9 | + 1 file changed, 3 insertions(+), 4 deletions(-) |
| 10 | + |
| 11 | +diff --git a/src/vs/workbench/browser/parts/paneCompositePart.ts b/src/vs/workbench/browser/parts/paneCompositePart.ts |
| 12 | +index fda9c918852..0fb422fde45 100644 |
| 13 | +--- a/src/vs/workbench/browser/parts/paneCompositePart.ts |
| 14 | ++++ b/src/vs/workbench/browser/parts/paneCompositePart.ts |
| 15 | +@@ -232,15 +232,15 @@ export abstract class AbstractPaneCompositePart extends CompositePart<PaneCompos |
| 16 | + } |
| 17 | + |
| 18 | + protected override showComposite(composite: Composite): void { |
| 19 | ++ this.layoutEmptyMessage(false); |
| 20 | + super.showComposite(composite); |
| 21 | + this.layoutCompositeBar(); |
| 22 | +- this.layoutEmptyMessage(); |
| 23 | + } |
| 24 | + |
| 25 | + protected override hideActiveComposite(): Composite | undefined { |
| 26 | + const composite = super.hideActiveComposite(); |
| 27 | + this.layoutCompositeBar(); |
| 28 | +- this.layoutEmptyMessage(); |
| 29 | ++ this.layoutEmptyMessage(true); |
| 30 | + return composite; |
| 31 | + } |
| 32 | + |
| 33 | +@@ -622,8 +622,7 @@ export abstract class AbstractPaneCompositePart extends CompositePart<PaneCompos |
| 34 | + } |
| 35 | + } |
| 36 | + |
| 37 | +- private layoutEmptyMessage(): void { |
| 38 | +- const visible = !this.getActiveComposite(); |
| 39 | ++ private layoutEmptyMessage(visible = !this.getActiveComposite()): void { |
| 40 | + this.element.classList.toggle('empty', visible); |
| 41 | + if (visible) { |
| 42 | + this.titleLabel?.updateTitle('', ''); |
0 commit comments