Skip to content

Commit 1f3a4f1

Browse files
committed
microsoft#100346 UI changes
- introduce sync and cancel buttons - ability to discard - update entries on state change with decorations
1 parent df336bb commit 1f3a4f1

6 files changed

Lines changed: 259 additions & 319 deletions

File tree

src/vs/workbench/browser/parts/views/treeView.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
2020

2121
export class TreeViewPane extends ViewPane {
2222

23-
private treeView: ITreeView;
23+
protected readonly treeView: ITreeView;
2424

2525
constructor(
2626
options: IViewletViewOptions,
@@ -55,7 +55,7 @@ export class TreeViewPane extends ViewPane {
5555

5656
renderBody(container: HTMLElement): void {
5757
super.renderBody(container);
58-
this.treeView.show(container);
58+
this.renderTreeView(container);
5959
}
6060

6161
shouldShowWelcome(): boolean {
@@ -64,13 +64,21 @@ export class TreeViewPane extends ViewPane {
6464

6565
layoutBody(height: number, width: number): void {
6666
super.layoutBody(height, width);
67-
this.treeView.layout(height, width);
67+
this.layoutTreeView(height, width);
6868
}
6969

7070
getOptimalWidth(): number {
7171
return this.treeView.getOptimalWidth();
7272
}
7373

74+
protected renderTreeView(container: HTMLElement): void {
75+
this.treeView.show(container);
76+
}
77+
78+
protected layoutTreeView(height: number, width: number): void {
79+
this.treeView.layout(height, width);
80+
}
81+
7482
private updateTreeVisibility(): void {
7583
this.treeView.setVisibility(this.isBodyVisible());
7684
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
.monaco-workbench .pane > .pane-body > .manual-sync-buttons-container {
7+
display: flex;
8+
flex-direction: column;
9+
padding: 13px 20px 0 20px;
10+
box-sizing: border-box;
11+
}
12+
13+
.monaco-workbench .pane > .pane-body > .manual-sync-buttons-container .monaco-button {
14+
margin-block-start: 13px;
15+
margin-block-end: 13px;
16+
margin-inline-start: 0px;
17+
margin-inline-end: 0px;
18+
max-width: 260px;
19+
margin-left: auto;
20+
margin-right: auto;
21+
}

0 commit comments

Comments
 (0)