@codingame/monaco-vscode-view-status-bar-service-override 5.3.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +4 -4
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarActions.js +16 -14
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarItem.js +3 -2
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarModel.js +12 -11
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.js +16 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-view-status-bar-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@6.0.1"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -6,10 +6,10 @@ import { isAccessibilityInformation } from 'vscode/vscode/vs/platform/accessibil
|
|
|
6
6
|
import { ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
7
7
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
8
|
import { asStatusBarItemIdentifier } from 'vscode/vscode/vs/workbench/api/common/extHostTypes';
|
|
9
|
-
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
9
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
10
10
|
import { isProposedApiEnabled } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
11
11
|
import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
12
|
-
import { IExtensionStatusBarItemService } from 'vscode/vscode/vs/workbench/api/browser/statusBarService';
|
|
12
|
+
import { StatusBarUpdateKind, IExtensionStatusBarItemService } from 'vscode/vscode/vs/workbench/api/browser/statusBarService';
|
|
13
13
|
|
|
14
14
|
const _moduleId = "vs/workbench/api/browser/statusBarExtensionPoint";
|
|
15
15
|
function isUserFriendlyStatusItemEntry(candidate) {
|
|
@@ -136,7 +136,7 @@ let StatusBarItemsExtensionPoint = class StatusBarItemsExtensionPoint {
|
|
|
136
136
|
}
|
|
137
137
|
const fullItemId = asStatusBarItemIdentifier(entry.description.identifier, candidate.id);
|
|
138
138
|
const kind = statusBarItemsService.setOrUpdateEntry(fullItemId, fullItemId, ExtensionIdentifier.toKey(entry.description.identifier), candidate.name ?? entry.description.displayName ?? entry.description.name, candidate.text, candidate.tooltip, candidate.command ? { id: candidate.command, title: candidate.name } : undefined, undefined, undefined, candidate.alignment === 'left', candidate.priority, candidate.accessibilityInformation);
|
|
139
|
-
if (kind ===
|
|
139
|
+
if (kind === StatusBarUpdateKind.DidDefine) {
|
|
140
140
|
contributions.add(toDisposable(() => statusBarItemsService.unsetEntry(fullItemId)));
|
|
141
141
|
}
|
|
142
142
|
}
|
|
@@ -157,6 +157,6 @@ let StatusBarItemsExtensionPointWorkbenchContribution = class StatusBarItemsExte
|
|
|
157
157
|
StatusBarItemsExtensionPointWorkbenchContribution = ( (__decorate([
|
|
158
158
|
( (__param(0, IInstantiationService)))
|
|
159
159
|
], StatusBarItemsExtensionPointWorkbenchContribution)));
|
|
160
|
-
registerWorkbenchContribution2(StatusBarItemsExtensionPointWorkbenchContribution.ID, StatusBarItemsExtensionPointWorkbenchContribution,
|
|
160
|
+
registerWorkbenchContribution2(StatusBarItemsExtensionPointWorkbenchContribution.ID, StatusBarItemsExtensionPointWorkbenchContribution, WorkbenchPhase.BlockStartup);
|
|
161
161
|
|
|
162
162
|
export { StatusBarItemsExtensionPoint };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
2
2
|
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
|
|
3
3
|
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
4
|
+
import { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
4
5
|
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
5
|
-
import {
|
|
6
|
+
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
7
|
+
import { KeybindingsRegistry, KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
6
8
|
import { Action2, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
7
9
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
8
10
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
@@ -36,9 +38,9 @@ class HideStatusbarEntryAction extends Action {
|
|
|
36
38
|
}
|
|
37
39
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
38
40
|
id: 'workbench.statusBar.focusPrevious',
|
|
39
|
-
weight:
|
|
40
|
-
primary:
|
|
41
|
-
secondary: [
|
|
41
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
42
|
+
primary: KeyCode.LeftArrow,
|
|
43
|
+
secondary: [KeyCode.UpArrow],
|
|
42
44
|
when: StatusBarFocused,
|
|
43
45
|
handler: (accessor) => {
|
|
44
46
|
const statusBarService = accessor.get(IStatusbarService);
|
|
@@ -47,9 +49,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
47
49
|
});
|
|
48
50
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
49
51
|
id: 'workbench.statusBar.focusNext',
|
|
50
|
-
weight:
|
|
51
|
-
primary:
|
|
52
|
-
secondary: [
|
|
52
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
53
|
+
primary: KeyCode.RightArrow,
|
|
54
|
+
secondary: [KeyCode.DownArrow],
|
|
53
55
|
when: StatusBarFocused,
|
|
54
56
|
handler: (accessor) => {
|
|
55
57
|
const statusBarService = accessor.get(IStatusbarService);
|
|
@@ -58,8 +60,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
58
60
|
});
|
|
59
61
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
60
62
|
id: 'workbench.statusBar.focusFirst',
|
|
61
|
-
weight:
|
|
62
|
-
primary:
|
|
63
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
64
|
+
primary: KeyCode.Home,
|
|
63
65
|
when: StatusBarFocused,
|
|
64
66
|
handler: (accessor) => {
|
|
65
67
|
const statusBarService = accessor.get(IStatusbarService);
|
|
@@ -69,8 +71,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
69
71
|
});
|
|
70
72
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
71
73
|
id: 'workbench.statusBar.focusLast',
|
|
72
|
-
weight:
|
|
73
|
-
primary:
|
|
74
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
75
|
+
primary: KeyCode.End,
|
|
74
76
|
when: StatusBarFocused,
|
|
75
77
|
handler: (accessor) => {
|
|
76
78
|
const statusBarService = accessor.get(IStatusbarService);
|
|
@@ -80,8 +82,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
80
82
|
});
|
|
81
83
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
82
84
|
id: 'workbench.statusBar.clearFocus',
|
|
83
|
-
weight:
|
|
84
|
-
primary:
|
|
85
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
86
|
+
primary: KeyCode.Escape,
|
|
85
87
|
when: StatusBarFocused,
|
|
86
88
|
handler: (accessor) => {
|
|
87
89
|
const statusBarService = accessor.get(IStatusbarService);
|
|
@@ -105,7 +107,7 @@ class FocusStatusBarAction extends Action2 {
|
|
|
105
107
|
}
|
|
106
108
|
async run(accessor) {
|
|
107
109
|
const layoutService = accessor.get(IWorkbenchLayoutService);
|
|
108
|
-
layoutService.focusPart(
|
|
110
|
+
layoutService.focusPart(Parts.STATUSBAR_PART, getActiveWindow());
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
113
|
registerAction2(FocusStatusBarAction);
|
|
@@ -11,6 +11,7 @@ import { show, hide, addDisposableListener, EventType, EventHelper, append } fro
|
|
|
11
11
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
12
12
|
import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
|
|
13
13
|
import { StandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
|
|
14
|
+
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
14
15
|
import { renderIcon, renderLabelWithIcons } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabels';
|
|
15
16
|
import { syncing, spinningLoading } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
|
|
16
17
|
import { isMarkdownString, markdownStringEqual } from 'vscode/vscode/vs/base/common/htmlContent';
|
|
@@ -101,11 +102,11 @@ let StatusbarEntryItem = class StatusbarEntryItem extends Disposable {
|
|
|
101
102
|
this.commandTouchListener.value = addDisposableListener(this.labelContainer, EventType$1.Tap, () => this.executeCommand(command));
|
|
102
103
|
this.commandKeyboardListener.value = addDisposableListener(this.labelContainer, EventType.KEY_DOWN, e => {
|
|
103
104
|
const event = ( new StandardKeyboardEvent(e));
|
|
104
|
-
if (event.equals(
|
|
105
|
+
if (event.equals(KeyCode.Space) || event.equals(KeyCode.Enter)) {
|
|
105
106
|
EventHelper.stop(e);
|
|
106
107
|
this.executeCommand(command);
|
|
107
108
|
}
|
|
108
|
-
else if (event.equals(
|
|
109
|
+
else if (event.equals(KeyCode.Escape) || event.equals(KeyCode.LeftArrow) || event.equals(KeyCode.RightArrow)) {
|
|
109
110
|
EventHelper.stop(e);
|
|
110
111
|
this.hover?.hide();
|
|
111
112
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
2
|
-
import { isStatusbarEntryLocation } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
2
|
+
import { isStatusbarEntryLocation, StatusbarAlignment } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
3
3
|
import { isAncestorOfActiveElement, hide, show } from 'vscode/vscode/vs/base/browser/dom';
|
|
4
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
4
5
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
5
6
|
|
|
6
7
|
class StatusbarViewModel extends Disposable {
|
|
@@ -20,7 +21,7 @@ class StatusbarViewModel extends Disposable {
|
|
|
20
21
|
this.registerListeners();
|
|
21
22
|
}
|
|
22
23
|
restoreState() {
|
|
23
|
-
const hiddenRaw = this.storageService.get(StatusbarViewModel.HIDDEN_ENTRIES_KEY,
|
|
24
|
+
const hiddenRaw = this.storageService.get(StatusbarViewModel.HIDDEN_ENTRIES_KEY, StorageScope.PROFILE);
|
|
24
25
|
if (hiddenRaw) {
|
|
25
26
|
try {
|
|
26
27
|
this.hidden = ( new Set(JSON.parse(hiddenRaw)));
|
|
@@ -30,7 +31,7 @@ class StatusbarViewModel extends Disposable {
|
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
registerListeners() {
|
|
33
|
-
this._register(this.storageService.onDidChangeValue(
|
|
34
|
+
this._register(this.storageService.onDidChangeValue(StorageScope.PROFILE, StatusbarViewModel.HIDDEN_ENTRIES_KEY, this._register(( new DisposableStore())))(() => this.onDidStorageValueChange()));
|
|
34
35
|
}
|
|
35
36
|
onDidStorageValueChange() {
|
|
36
37
|
const currentlyHidden = ( new Set(this.hidden));
|
|
@@ -160,10 +161,10 @@ class StatusbarViewModel extends Disposable {
|
|
|
160
161
|
}
|
|
161
162
|
saveState() {
|
|
162
163
|
if (this.hidden.size > 0) {
|
|
163
|
-
this.storageService.store(StatusbarViewModel.HIDDEN_ENTRIES_KEY, JSON.stringify(Array.from(( this.hidden.values()))),
|
|
164
|
+
this.storageService.store(StatusbarViewModel.HIDDEN_ENTRIES_KEY, JSON.stringify(Array.from(( this.hidden.values()))), StorageScope.PROFILE, StorageTarget.USER);
|
|
164
165
|
}
|
|
165
166
|
else {
|
|
166
|
-
this.storageService.remove(StatusbarViewModel.HIDDEN_ENTRIES_KEY,
|
|
167
|
+
this.storageService.remove(StatusbarViewModel.HIDDEN_ENTRIES_KEY, StorageScope.PROFILE);
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
170
|
sort() {
|
|
@@ -194,10 +195,10 @@ class StatusbarViewModel extends Disposable {
|
|
|
194
195
|
}
|
|
195
196
|
return mapEntryWithNumberedPriorityToIndex.get(entryA) - mapEntryWithNumberedPriorityToIndex.get(entryB);
|
|
196
197
|
}
|
|
197
|
-
if (entryA.alignment ===
|
|
198
|
+
if (entryA.alignment === StatusbarAlignment.LEFT) {
|
|
198
199
|
return -1;
|
|
199
200
|
}
|
|
200
|
-
if (entryB.alignment ===
|
|
201
|
+
if (entryB.alignment === StatusbarAlignment.LEFT) {
|
|
201
202
|
return 1;
|
|
202
203
|
}
|
|
203
204
|
return 0;
|
|
@@ -208,11 +209,11 @@ class StatusbarViewModel extends Disposable {
|
|
|
208
209
|
for (const entry of sortedEntriesWithNumberedPriority) {
|
|
209
210
|
const relativeEntries = mapEntryWithRelativePriority.get(entry.id);
|
|
210
211
|
if (relativeEntries) {
|
|
211
|
-
sortedEntries.push(...relativeEntries.filter(entry => isStatusbarEntryLocation(entry.priority.primary) && entry.priority.primary.alignment ===
|
|
212
|
+
sortedEntries.push(...relativeEntries.filter(entry => isStatusbarEntryLocation(entry.priority.primary) && entry.priority.primary.alignment === StatusbarAlignment.LEFT));
|
|
212
213
|
}
|
|
213
214
|
sortedEntries.push(entry);
|
|
214
215
|
if (relativeEntries) {
|
|
215
|
-
sortedEntries.push(...relativeEntries.filter(entry => isStatusbarEntryLocation(entry.priority.primary) && entry.priority.primary.alignment ===
|
|
216
|
+
sortedEntries.push(...relativeEntries.filter(entry => isStatusbarEntryLocation(entry.priority.primary) && entry.priority.primary.alignment === StatusbarAlignment.RIGHT));
|
|
216
217
|
}
|
|
217
218
|
mapEntryWithRelativePriority.delete(entry.id);
|
|
218
219
|
}
|
|
@@ -226,8 +227,8 @@ class StatusbarViewModel extends Disposable {
|
|
|
226
227
|
this._entries = sortedEntries;
|
|
227
228
|
}
|
|
228
229
|
markFirstLastVisibleEntry() {
|
|
229
|
-
this.doMarkFirstLastVisibleStatusbarItem(this.getEntries(
|
|
230
|
-
this.doMarkFirstLastVisibleStatusbarItem(this.getEntries(
|
|
230
|
+
this.doMarkFirstLastVisibleStatusbarItem(this.getEntries(StatusbarAlignment.LEFT));
|
|
231
|
+
this.doMarkFirstLastVisibleStatusbarItem(this.getEntries(StatusbarAlignment.RIGHT));
|
|
231
232
|
}
|
|
232
233
|
doMarkFirstLastVisibleStatusbarItem(entries) {
|
|
233
234
|
let firstVisibleItem;
|
|
@@ -5,12 +5,13 @@ import { MutableDisposable, dispose, DisposableStore, disposeIfDisposable, toDis
|
|
|
5
5
|
import { Part, MultiWindowParts } from 'vscode/vscode/vs/workbench/browser/part';
|
|
6
6
|
import { Gesture, EventType as EventType$1 } from 'vscode/vscode/vs/base/browser/touch';
|
|
7
7
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
|
-
import { isStatusbarEntryPriority, isStatusbarEntryLocation } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
8
|
+
import { isStatusbarEntryPriority, StatusbarAlignment, isStatusbarEntryLocation } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
9
9
|
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
|
|
10
10
|
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
11
11
|
import { toAction, Separator } from 'vscode/vscode/vs/base/common/actions';
|
|
12
12
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
13
13
|
import { STATUS_BAR_ITEM_HOVER_BACKGROUND, STATUS_BAR_ITEM_COMPACT_HOVER_BACKGROUND, STATUS_BAR_BACKGROUND, STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_FOREGROUND, STATUS_BAR_ITEM_FOCUS_BORDER, STATUS_BAR_BORDER, STATUS_BAR_NO_FOLDER_BORDER, STATUS_BAR_FOCUS_BORDER } from 'vscode/vscode/vs/workbench/common/theme';
|
|
14
|
+
import { WorkbenchState } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
14
15
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
15
16
|
import 'vscode/vscode/vs/platform/theme/common/colorUtils';
|
|
16
17
|
import { contrastBorder, activeContrastBorder } from 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
|
|
@@ -25,7 +26,9 @@ import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
|
25
26
|
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
26
27
|
import { addDisposableListener, EventType, clearNode, EventHelper, getWindow, createStyleSheet } from 'vscode/vscode/vs/base/browser/dom';
|
|
27
28
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
29
|
+
import { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
28
30
|
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
31
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
29
32
|
import { equals } from 'vscode/vscode/vs/base/common/arrays';
|
|
30
33
|
import { StandardMouseEvent } from 'vscode/vscode/vs/base/browser/mouseEvent';
|
|
31
34
|
import { ToggleStatusbarVisibilityAction } from 'vscode/vscode/vs/workbench/browser/actions/layoutActions';
|
|
@@ -158,7 +161,7 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
158
161
|
if (extraClasses) {
|
|
159
162
|
itemContainer.classList.add(...extraClasses);
|
|
160
163
|
}
|
|
161
|
-
if (alignment ===
|
|
164
|
+
if (alignment === StatusbarAlignment.RIGHT) {
|
|
162
165
|
itemContainer.classList.add('right');
|
|
163
166
|
}
|
|
164
167
|
else {
|
|
@@ -243,20 +246,20 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
243
246
|
clearNode(leftItemsContainer);
|
|
244
247
|
clearNode(rightItemsContainer);
|
|
245
248
|
for (const entry of [
|
|
246
|
-
...this.viewModel.getEntries(
|
|
247
|
-
...this.viewModel.getEntries(
|
|
249
|
+
...this.viewModel.getEntries(StatusbarAlignment.LEFT),
|
|
250
|
+
...this.viewModel.getEntries(StatusbarAlignment.RIGHT).reverse()
|
|
248
251
|
]) {
|
|
249
|
-
const target = entry.alignment ===
|
|
252
|
+
const target = entry.alignment === StatusbarAlignment.LEFT ? leftItemsContainer : rightItemsContainer;
|
|
250
253
|
target.appendChild(entry.container);
|
|
251
254
|
}
|
|
252
255
|
this.updateCompactEntries();
|
|
253
256
|
}
|
|
254
257
|
appendStatusbarEntry(entry) {
|
|
255
258
|
const entries = this.viewModel.getEntries(entry.alignment);
|
|
256
|
-
if (entry.alignment ===
|
|
259
|
+
if (entry.alignment === StatusbarAlignment.RIGHT) {
|
|
257
260
|
entries.reverse();
|
|
258
261
|
}
|
|
259
|
-
const target = assertIsDefined(entry.alignment ===
|
|
262
|
+
const target = assertIsDefined(entry.alignment === StatusbarAlignment.LEFT ? this.leftItemsContainer : this.rightItemsContainer);
|
|
260
263
|
const index = entries.indexOf(entry);
|
|
261
264
|
if (index + 1 === entries.length) {
|
|
262
265
|
target.appendChild(entry.container);
|
|
@@ -293,7 +296,7 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
293
296
|
else {
|
|
294
297
|
compactEntryGroup.add(entry);
|
|
295
298
|
}
|
|
296
|
-
if (entry.priority.primary.alignment ===
|
|
299
|
+
if (entry.priority.primary.alignment === StatusbarAlignment.LEFT) {
|
|
297
300
|
location.container.classList.add('compact-left');
|
|
298
301
|
entry.container.classList.add('compact-right');
|
|
299
302
|
}
|
|
@@ -369,12 +372,12 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
369
372
|
super.updateStyles();
|
|
370
373
|
const container = assertIsDefined(this.getContainer());
|
|
371
374
|
const styleOverride = [...this.styleOverrides].sort((a, b) => a.priority - b.priority)[0];
|
|
372
|
-
const backgroundColor = this.getColor(styleOverride?.background ?? (this.contextService.getWorkbenchState() !==
|
|
375
|
+
const backgroundColor = this.getColor(styleOverride?.background ?? (this.contextService.getWorkbenchState() !== WorkbenchState.EMPTY ? STATUS_BAR_BACKGROUND : STATUS_BAR_NO_FOLDER_BACKGROUND)) || '';
|
|
373
376
|
container.style.backgroundColor = backgroundColor;
|
|
374
|
-
const foregroundColor = this.getColor(styleOverride?.foreground ?? (this.contextService.getWorkbenchState() !==
|
|
377
|
+
const foregroundColor = this.getColor(styleOverride?.foreground ?? (this.contextService.getWorkbenchState() !== WorkbenchState.EMPTY ? STATUS_BAR_FOREGROUND : STATUS_BAR_NO_FOLDER_FOREGROUND)) || '';
|
|
375
378
|
container.style.color = foregroundColor;
|
|
376
379
|
const itemBorderColor = this.getColor(STATUS_BAR_ITEM_FOCUS_BORDER);
|
|
377
|
-
const borderColor = this.getColor(styleOverride?.border ?? (this.contextService.getWorkbenchState() !==
|
|
380
|
+
const borderColor = this.getColor(styleOverride?.border ?? (this.contextService.getWorkbenchState() !== WorkbenchState.EMPTY ? STATUS_BAR_BORDER : STATUS_BAR_NO_FOLDER_BORDER)) || this.getColor(contrastBorder);
|
|
378
381
|
if (borderColor) {
|
|
379
382
|
container.classList.add('status-border-top');
|
|
380
383
|
container.style.setProperty('--status-border-top-color', borderColor);
|
|
@@ -420,7 +423,7 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
420
423
|
}
|
|
421
424
|
toJSON() {
|
|
422
425
|
return {
|
|
423
|
-
type:
|
|
426
|
+
type: Parts.STATUSBAR_PART
|
|
424
427
|
};
|
|
425
428
|
}
|
|
426
429
|
dispose() {
|
|
@@ -439,7 +442,7 @@ StatusbarPart = StatusbarPart_1 = ( (__decorate([
|
|
|
439
442
|
], StatusbarPart)));
|
|
440
443
|
let MainStatusbarPart = class MainStatusbarPart extends StatusbarPart {
|
|
441
444
|
constructor(instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService) {
|
|
442
|
-
super(
|
|
445
|
+
super(Parts.STATUSBAR_PART, instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService);
|
|
443
446
|
}
|
|
444
447
|
};
|
|
445
448
|
MainStatusbarPart = ( (__decorate([
|