@codingame/monaco-vscode-view-status-bar-service-override 36.2.7 → 37.2.0
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/browser/parts/statusbar/media/statusbarpart.css +4 -0
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarActions.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarItem.js +2 -0
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.d.ts +16 -7
- package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.js +84 -17
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": "37.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - view-status-bar service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "37.2.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -183,6 +183,10 @@
|
|
|
183
183
|
background-color: var(--vscode-statusBarItem-warningBackground);
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
+
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.warning-kind.has-command:hover {
|
|
187
|
+
background-color: var(--vscode-statusBarItem-warningHoverBackground);
|
|
188
|
+
}
|
|
189
|
+
|
|
186
190
|
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.warning-kind a:hover:not(.disabled) {
|
|
187
191
|
color: var(--vscode-statusBarItem-warningHoverForeground);
|
|
188
192
|
background-color: var(--vscode-statusBarItem-warningHoverBackground) !important;
|
|
@@ -30,7 +30,7 @@ class ToggleStatusbarEntryVisibilityAction extends Action {
|
|
|
30
30
|
}
|
|
31
31
|
class HideStatusbarEntryAction extends Action {
|
|
32
32
|
constructor(id, name, model) {
|
|
33
|
-
super(id, ( localize(
|
|
33
|
+
super(id, ( localize(4212, "Hide '{0}'", name)), undefined, true);
|
|
34
34
|
this.model = model;
|
|
35
35
|
}
|
|
36
36
|
async run() {
|
|
@@ -39,7 +39,7 @@ class HideStatusbarEntryAction extends Action {
|
|
|
39
39
|
}
|
|
40
40
|
let ManageExtensionAction = class ManageExtensionAction extends Action {
|
|
41
41
|
constructor(extensionId, commandService) {
|
|
42
|
-
super("statusbar.manage.extension", ( localize(
|
|
42
|
+
super("statusbar.manage.extension", ( localize(4213, "Manage Extension")));
|
|
43
43
|
this.extensionId = extensionId;
|
|
44
44
|
this.commandService = commandService;
|
|
45
45
|
}
|
|
@@ -111,7 +111,7 @@ class FocusStatusBarAction extends Action2 {
|
|
|
111
111
|
constructor() {
|
|
112
112
|
super({
|
|
113
113
|
id: "workbench.action.focusStatusBar",
|
|
114
|
-
title: ( localize2(
|
|
114
|
+
title: ( localize2(4214, "Focus Status Bar")),
|
|
115
115
|
category: Categories.View,
|
|
116
116
|
f1: true
|
|
117
117
|
});
|
|
@@ -131,8 +131,10 @@ let StatusbarEntryItem = class StatusbarEntryItem extends Disposable {
|
|
|
131
131
|
this.hover?.hide();
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
|
+
this.container.classList.add("has-command");
|
|
134
135
|
this.labelContainer.classList.remove("disabled");
|
|
135
136
|
} else {
|
|
137
|
+
this.container.classList.remove("has-command");
|
|
136
138
|
this.labelContainer.classList.add("disabled");
|
|
137
139
|
}
|
|
138
140
|
}
|
|
@@ -12,6 +12,8 @@ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
12
12
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
13
13
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
14
14
|
import { IView } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/grid/grid";
|
|
15
|
+
import { IHostService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service";
|
|
16
|
+
import { CodeWindow } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/window";
|
|
15
17
|
export interface IStatusbarEntryContainer extends IDisposable {
|
|
16
18
|
/**
|
|
17
19
|
* An event that is triggered when an entry's visibility is changed.
|
|
@@ -74,18 +76,21 @@ export interface IStatusbarEntryContainer extends IDisposable {
|
|
|
74
76
|
overrideStyle(style: IStatusbarStyleOverride): IDisposable;
|
|
75
77
|
}
|
|
76
78
|
declare class StatusbarPart extends Part implements IStatusbarEntryContainer {
|
|
79
|
+
private readonly targetWindow;
|
|
77
80
|
private readonly instantiationService;
|
|
78
81
|
private readonly contextService;
|
|
79
82
|
private readonly contextMenuService;
|
|
80
83
|
private readonly contextKeyService;
|
|
81
84
|
private readonly configurationService;
|
|
85
|
+
private readonly hostService;
|
|
82
86
|
static readonly HEIGHT = 22;
|
|
83
87
|
/**
|
|
84
|
-
*
|
|
85
|
-
* experiment so
|
|
86
|
-
*
|
|
88
|
+
* Vertical padding reserved around the main status bar under the floating panels
|
|
89
|
+
* experiment so its items remain centered. The part grows by this amount and
|
|
90
|
+
* the matching padding is applied in `floatingPanels.css`.
|
|
87
91
|
*/
|
|
88
|
-
static readonly FLOATING_BOTTOM_PADDING =
|
|
92
|
+
static readonly FLOATING_BOTTOM_PADDING = 6;
|
|
93
|
+
static readonly COMPACT_DENSITY_FLOATING_BOTTOM_PADDING = 4;
|
|
89
94
|
private get floatingBottomPadding();
|
|
90
95
|
readonly minimumWidth: number;
|
|
91
96
|
readonly maximumWidth: number;
|
|
@@ -107,8 +112,10 @@ declare class StatusbarPart extends Part implements IStatusbarEntryContainer {
|
|
|
107
112
|
private readonly hoverDelegate;
|
|
108
113
|
private readonly compactEntriesDisposable;
|
|
109
114
|
private readonly styleOverrides;
|
|
110
|
-
|
|
115
|
+
private activeWindowId;
|
|
116
|
+
constructor(id: string, targetWindow: CodeWindow, instantiationService: IInstantiationService, themeService: IThemeService, contextService: IWorkspaceContextService, storageService: IStorageService, layoutService: IWorkbenchLayoutService, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, hostService: IHostService);
|
|
111
117
|
private registerListeners;
|
|
118
|
+
protected hasWindowFocus(): boolean;
|
|
112
119
|
overrideEntry(id: string, override: Partial<IStatusbarEntry>): IDisposable;
|
|
113
120
|
private withEntryOverride;
|
|
114
121
|
addEntry(entry: IStatusbarEntry, id: string, alignment: StatusbarAlignment, priorityOrLocation?: number | IStatusbarEntryLocation | IStatusbarEntryPriority): IStatusbarEntryAccessor;
|
|
@@ -127,6 +134,8 @@ declare class StatusbarPart extends Part implements IStatusbarEntryContainer {
|
|
|
127
134
|
private appendStatusbarEntries;
|
|
128
135
|
private appendStatusbarEntry;
|
|
129
136
|
private updateCompactEntries;
|
|
137
|
+
private updateVisibleBackgroundColorNeighbors;
|
|
138
|
+
private doUpdateVisibleBackgroundColorNeighbors;
|
|
130
139
|
private showContextMenu;
|
|
131
140
|
private getContextMenuActions;
|
|
132
141
|
updateStyles(): void;
|
|
@@ -136,7 +145,7 @@ declare class StatusbarPart extends Part implements IStatusbarEntryContainer {
|
|
|
136
145
|
dispose(): void;
|
|
137
146
|
}
|
|
138
147
|
export declare class MainStatusbarPart extends StatusbarPart {
|
|
139
|
-
constructor(instantiationService: IInstantiationService, themeService: IThemeService, contextService: IWorkspaceContextService, storageService: IStorageService, layoutService: IWorkbenchLayoutService, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService, configurationService: IConfigurationService);
|
|
148
|
+
constructor(instantiationService: IInstantiationService, themeService: IThemeService, contextService: IWorkspaceContextService, storageService: IStorageService, layoutService: IWorkbenchLayoutService, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, hostService: IHostService);
|
|
140
149
|
}
|
|
141
150
|
export interface IAuxiliaryStatusbarPart extends IStatusbarEntryContainer, IView {
|
|
142
151
|
readonly container: HTMLElement;
|
|
@@ -146,7 +155,7 @@ export declare class AuxiliaryStatusbarPart extends StatusbarPart implements IAu
|
|
|
146
155
|
readonly container: HTMLElement;
|
|
147
156
|
private static COUNTER;
|
|
148
157
|
readonly height = 22;
|
|
149
|
-
constructor(container: HTMLElement, instantiationService: IInstantiationService, themeService: IThemeService, contextService: IWorkspaceContextService, storageService: IStorageService, layoutService: IWorkbenchLayoutService, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService, configurationService: IConfigurationService);
|
|
158
|
+
constructor(container: HTMLElement, instantiationService: IInstantiationService, themeService: IThemeService, contextService: IWorkspaceContextService, storageService: IStorageService, layoutService: IWorkbenchLayoutService, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, hostService: IHostService);
|
|
150
159
|
}
|
|
151
160
|
export declare class StatusbarService extends MultiWindowParts<StatusbarPart> implements IStatusbarService {
|
|
152
161
|
private readonly instantiationService;
|
|
@@ -12,7 +12,7 @@ import { IStatusbarService } from '@codingame/monaco-vscode-api/vscode/vs/workbe
|
|
|
12
12
|
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
13
13
|
import { toAction, Separator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
14
14
|
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
15
|
-
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 '@codingame/monaco-vscode-api/vscode/vs/workbench/common/theme';
|
|
15
|
+
import { STATUS_BAR_ITEM_HOVER_BACKGROUND, STATUS_BAR_ITEM_COMPACT_HOVER_BACKGROUND, STATUS_BAR_BACKGROUND, STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_INACTIVE_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 '@codingame/monaco-vscode-api/vscode/vs/workbench/common/theme';
|
|
16
16
|
import { WorkbenchState } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';
|
|
17
17
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
18
18
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
|
|
@@ -29,7 +29,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/sear
|
|
|
29
29
|
import { isHTMLElement, $, addDisposableListener, EventType, clearNode, EventHelper, getWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
30
30
|
import { createStyleSheet } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/domStylesheets';
|
|
31
31
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
32
|
-
import {
|
|
32
|
+
import { Parts, LayoutSettings } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
33
33
|
import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
34
34
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
35
35
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
@@ -47,6 +47,8 @@ import { StatusbarEntryItem } from './statusbarItem.js';
|
|
|
47
47
|
import { StatusBarFocused } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
48
48
|
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
49
49
|
import { isManagedHoverTooltipMarkdownString, isManagedHoverTooltipHTMLElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hover';
|
|
50
|
+
import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
|
|
51
|
+
import { mainWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/window';
|
|
50
52
|
|
|
51
53
|
var StatusbarPart_1, AuxiliaryStatusbarPart_1;
|
|
52
54
|
registerCss(statusbarpart);
|
|
@@ -58,10 +60,16 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
58
60
|
this.HEIGHT = 22;
|
|
59
61
|
}
|
|
60
62
|
static {
|
|
61
|
-
this.FLOATING_BOTTOM_PADDING =
|
|
63
|
+
this.FLOATING_BOTTOM_PADDING = 6;
|
|
64
|
+
}
|
|
65
|
+
static {
|
|
66
|
+
this.COMPACT_DENSITY_FLOATING_BOTTOM_PADDING = 4;
|
|
62
67
|
}
|
|
63
68
|
get floatingBottomPadding() {
|
|
64
|
-
|
|
69
|
+
if (this.getId() !== Parts.STATUSBAR_PART || !this.layoutService.isFloatingPanelsEnabled()) {
|
|
70
|
+
return 0;
|
|
71
|
+
}
|
|
72
|
+
return this.layoutService.isModernUICompact() ? StatusbarPart_1.COMPACT_DENSITY_FLOATING_BOTTOM_PADDING : StatusbarPart_1.FLOATING_BOTTOM_PADDING;
|
|
65
73
|
}
|
|
66
74
|
get minimumHeight() {
|
|
67
75
|
return StatusbarPart_1.HEIGHT + this.floatingBottomPadding;
|
|
@@ -71,6 +79,7 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
71
79
|
}
|
|
72
80
|
constructor(
|
|
73
81
|
id,
|
|
82
|
+
targetWindow,
|
|
74
83
|
instantiationService,
|
|
75
84
|
themeService,
|
|
76
85
|
contextService,
|
|
@@ -78,16 +87,19 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
78
87
|
layoutService,
|
|
79
88
|
contextMenuService,
|
|
80
89
|
contextKeyService,
|
|
81
|
-
configurationService
|
|
90
|
+
configurationService,
|
|
91
|
+
hostService
|
|
82
92
|
) {
|
|
83
93
|
super(id, {
|
|
84
94
|
hasTitle: false
|
|
85
95
|
}, themeService, storageService, layoutService);
|
|
96
|
+
this.targetWindow = targetWindow;
|
|
86
97
|
this.instantiationService = instantiationService;
|
|
87
98
|
this.contextService = contextService;
|
|
88
99
|
this.contextMenuService = contextMenuService;
|
|
89
100
|
this.contextKeyService = contextKeyService;
|
|
90
101
|
this.configurationService = configurationService;
|
|
102
|
+
this.hostService = hostService;
|
|
91
103
|
this.minimumWidth = 0;
|
|
92
104
|
this.maximumWidth = Number.POSITIVE_INFINITY;
|
|
93
105
|
this.pendingEntries = [];
|
|
@@ -123,12 +135,28 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
123
135
|
registerListeners() {
|
|
124
136
|
this._register(this.onDidChangeEntryVisibility(() => this.updateCompactEntries()));
|
|
125
137
|
this._register(this.contextService.onDidChangeWorkbenchState(() => this.updateStyles()));
|
|
138
|
+
const updateStyles = () => {
|
|
139
|
+
if (this.element) {
|
|
140
|
+
this.updateStyles();
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
this._register(this.hostService.onDidChangeFocus(updateStyles));
|
|
144
|
+
this._register(this.hostService.onDidChangeActiveWindow(windowId => {
|
|
145
|
+
this.activeWindowId = windowId;
|
|
146
|
+
updateStyles();
|
|
147
|
+
}));
|
|
126
148
|
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
127
|
-
if (this.getId() === Parts.STATUSBAR_PART && e.affectsConfiguration(LayoutSettings.MODERN_UI)) {
|
|
149
|
+
if (this.getId() === Parts.STATUSBAR_PART && (e.affectsConfiguration(LayoutSettings.MODERN_UI) || e.affectsConfiguration(LayoutSettings.MODERN_UI_DENSITY))) {
|
|
128
150
|
this._onDidChange.fire(undefined);
|
|
151
|
+
if (this.element) {
|
|
152
|
+
this.updateStyles();
|
|
153
|
+
}
|
|
129
154
|
}
|
|
130
155
|
}));
|
|
131
156
|
}
|
|
157
|
+
hasWindowFocus() {
|
|
158
|
+
return this.targetWindow.document.hasFocus();
|
|
159
|
+
}
|
|
132
160
|
overrideEntry(id, override) {
|
|
133
161
|
this.entryOverrides.set(id, override);
|
|
134
162
|
this.onDidOverrideEntry.fire(id);
|
|
@@ -228,7 +256,11 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
228
256
|
const accessor = {
|
|
229
257
|
update: entry => {
|
|
230
258
|
lastEntry = entry;
|
|
259
|
+
const hadBackgroundColor = itemContainer.classList.contains("has-background-color");
|
|
231
260
|
item.update(this.withEntryOverride(entry, id));
|
|
261
|
+
if (hadBackgroundColor !== itemContainer.classList.contains("has-background-color")) {
|
|
262
|
+
this.updateVisibleBackgroundColorNeighbors();
|
|
263
|
+
}
|
|
232
264
|
},
|
|
233
265
|
dispose: () => {
|
|
234
266
|
const {
|
|
@@ -433,6 +465,31 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
433
465
|
}
|
|
434
466
|
}
|
|
435
467
|
}
|
|
468
|
+
this.updateVisibleBackgroundColorNeighbors();
|
|
469
|
+
}
|
|
470
|
+
updateVisibleBackgroundColorNeighbors() {
|
|
471
|
+
this.doUpdateVisibleBackgroundColorNeighbors(
|
|
472
|
+
this.viewModel.getEntries(StatusbarAlignment.LEFT),
|
|
473
|
+
StatusbarAlignment.LEFT
|
|
474
|
+
);
|
|
475
|
+
this.doUpdateVisibleBackgroundColorNeighbors(
|
|
476
|
+
this.viewModel.getEntries(StatusbarAlignment.RIGHT).reverse(),
|
|
477
|
+
StatusbarAlignment.RIGHT
|
|
478
|
+
);
|
|
479
|
+
}
|
|
480
|
+
doUpdateVisibleBackgroundColorNeighbors(entries, alignment) {
|
|
481
|
+
let previousVisibleEntry;
|
|
482
|
+
for (const entry of entries) {
|
|
483
|
+
entry.container.classList.remove("visible-background-color-neighbor");
|
|
484
|
+
if (this.viewModel.isHidden(entry.id)) {
|
|
485
|
+
continue;
|
|
486
|
+
}
|
|
487
|
+
const isCompactNeighbor = alignment === StatusbarAlignment.LEFT ? previousVisibleEntry?.container.classList.contains("compact-right") && entry.container.classList.contains("compact-left") : previousVisibleEntry?.container.classList.contains("compact-left") && entry.container.classList.contains("compact-right");
|
|
488
|
+
if (previousVisibleEntry?.container.classList.contains("has-background-color") && entry.container.classList.contains("has-background-color") && !isCompactNeighbor) {
|
|
489
|
+
entry.container.classList.add("visible-background-color-neighbor");
|
|
490
|
+
}
|
|
491
|
+
previousVisibleEntry = entry;
|
|
492
|
+
}
|
|
436
493
|
}
|
|
437
494
|
showContextMenu(e) {
|
|
438
495
|
EventHelper.stop(e, true);
|
|
@@ -455,7 +512,7 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
455
512
|
const actions = [];
|
|
456
513
|
actions.push(toAction({
|
|
457
514
|
id: ToggleStatusbarVisibilityAction.ID,
|
|
458
|
-
label: ( localize(
|
|
515
|
+
label: ( localize(4215, "Hide Status Bar")),
|
|
459
516
|
run: () => this.instantiationService.invokeFunction(accessor => ( new ToggleStatusbarVisibilityAction()).run(accessor))
|
|
460
517
|
}));
|
|
461
518
|
actions.push(( new Separator()));
|
|
@@ -489,10 +546,14 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
489
546
|
super.updateStyles();
|
|
490
547
|
const container = assertReturnsDefined(this.getContainer());
|
|
491
548
|
const styleOverride = [...this.styleOverrides].sort((a, b) => a.priority - b.priority)[0];
|
|
492
|
-
const
|
|
493
|
-
|
|
494
|
-
)
|
|
549
|
+
const hasFolder = this.contextService.getWorkbenchState() !== WorkbenchState.EMPTY;
|
|
550
|
+
const background = styleOverride?.background ?? (hasFolder ? STATUS_BAR_BACKGROUND : STATUS_BAR_NO_FOLDER_BACKGROUND);
|
|
551
|
+
const isWindowActive = this.activeWindowId === undefined ? this.hasWindowFocus() : this.activeWindowId === this.targetWindow.vscodeWindowId;
|
|
552
|
+
const isInactive = !this.hostService.hasFocus || !isWindowActive;
|
|
553
|
+
const inactiveBackground = isInactive && !styleOverride?.background && hasFolder ? this.getColor(STATUS_BAR_INACTIVE_BACKGROUND) : undefined;
|
|
554
|
+
const backgroundColor = inactiveBackground || this.getColor(background) || "";
|
|
495
555
|
container.style.backgroundColor = backgroundColor;
|
|
556
|
+
container.style.boxShadow = this.getId() === Parts.STATUSBAR_PART && this.layoutService.isFloatingPanelsEnabled() && !isHighContrast(this.theme.type) && backgroundColor ? `0 1px 0 ${backgroundColor}` : "";
|
|
496
557
|
const foregroundColor = this.getColor(
|
|
497
558
|
styleOverride?.foreground ?? (this.contextService.getWorkbenchState() !== WorkbenchState.EMPTY ? STATUS_BAR_FOREGROUND : STATUS_BAR_NO_FOLDER_FOREGROUND)
|
|
498
559
|
) || "";
|
|
@@ -554,7 +615,7 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
554
615
|
super.dispose();
|
|
555
616
|
}
|
|
556
617
|
};
|
|
557
|
-
StatusbarPart = StatusbarPart_1 = ( __decorate([( __param(
|
|
618
|
+
StatusbarPart = StatusbarPart_1 = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IThemeService)), ( __param(4, IWorkspaceContextService)), ( __param(5, IStorageService)), ( __param(6, IWorkbenchLayoutService)), ( __param(7, IContextMenuService)), ( __param(8, IContextKeyService)), ( __param(9, IConfigurationService)), ( __param(10, IHostService))], StatusbarPart));
|
|
558
619
|
let MainStatusbarPart = class MainStatusbarPart extends StatusbarPart {
|
|
559
620
|
constructor(
|
|
560
621
|
instantiationService,
|
|
@@ -564,10 +625,12 @@ let MainStatusbarPart = class MainStatusbarPart extends StatusbarPart {
|
|
|
564
625
|
layoutService,
|
|
565
626
|
contextMenuService,
|
|
566
627
|
contextKeyService,
|
|
567
|
-
configurationService
|
|
628
|
+
configurationService,
|
|
629
|
+
hostService
|
|
568
630
|
) {
|
|
569
631
|
super(
|
|
570
632
|
Parts.STATUSBAR_PART,
|
|
633
|
+
mainWindow,
|
|
571
634
|
instantiationService,
|
|
572
635
|
themeService,
|
|
573
636
|
contextService,
|
|
@@ -575,11 +638,12 @@ let MainStatusbarPart = class MainStatusbarPart extends StatusbarPart {
|
|
|
575
638
|
layoutService,
|
|
576
639
|
contextMenuService,
|
|
577
640
|
contextKeyService,
|
|
578
|
-
configurationService
|
|
641
|
+
configurationService,
|
|
642
|
+
hostService
|
|
579
643
|
);
|
|
580
644
|
}
|
|
581
645
|
};
|
|
582
|
-
MainStatusbarPart = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IThemeService)), ( __param(2, IWorkspaceContextService)), ( __param(3, IStorageService)), ( __param(4, IWorkbenchLayoutService)), ( __param(5, IContextMenuService)), ( __param(6, IContextKeyService)), ( __param(7, IConfigurationService))], MainStatusbarPart));
|
|
646
|
+
MainStatusbarPart = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IThemeService)), ( __param(2, IWorkspaceContextService)), ( __param(3, IStorageService)), ( __param(4, IWorkbenchLayoutService)), ( __param(5, IContextMenuService)), ( __param(6, IContextKeyService)), ( __param(7, IConfigurationService)), ( __param(8, IHostService))], MainStatusbarPart));
|
|
583
647
|
let AuxiliaryStatusbarPart = class AuxiliaryStatusbarPart extends StatusbarPart {
|
|
584
648
|
static {
|
|
585
649
|
AuxiliaryStatusbarPart_1 = this;
|
|
@@ -596,11 +660,13 @@ let AuxiliaryStatusbarPart = class AuxiliaryStatusbarPart extends StatusbarPart
|
|
|
596
660
|
layoutService,
|
|
597
661
|
contextMenuService,
|
|
598
662
|
contextKeyService,
|
|
599
|
-
configurationService
|
|
663
|
+
configurationService,
|
|
664
|
+
hostService
|
|
600
665
|
) {
|
|
601
666
|
const id = AuxiliaryStatusbarPart_1.COUNTER++;
|
|
602
667
|
super(
|
|
603
668
|
`workbench.parts.auxiliaryStatus.${id}`,
|
|
669
|
+
getWindow(container),
|
|
604
670
|
instantiationService,
|
|
605
671
|
themeService,
|
|
606
672
|
contextService,
|
|
@@ -608,13 +674,14 @@ let AuxiliaryStatusbarPart = class AuxiliaryStatusbarPart extends StatusbarPart
|
|
|
608
674
|
layoutService,
|
|
609
675
|
contextMenuService,
|
|
610
676
|
contextKeyService,
|
|
611
|
-
configurationService
|
|
677
|
+
configurationService,
|
|
678
|
+
hostService
|
|
612
679
|
);
|
|
613
680
|
this.container = container;
|
|
614
681
|
this.height = StatusbarPart.HEIGHT;
|
|
615
682
|
}
|
|
616
683
|
};
|
|
617
|
-
AuxiliaryStatusbarPart = AuxiliaryStatusbarPart_1 = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IThemeService)), ( __param(3, IWorkspaceContextService)), ( __param(4, IStorageService)), ( __param(5, IWorkbenchLayoutService)), ( __param(6, IContextMenuService)), ( __param(7, IContextKeyService)), ( __param(8, IConfigurationService))], AuxiliaryStatusbarPart));
|
|
684
|
+
AuxiliaryStatusbarPart = AuxiliaryStatusbarPart_1 = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IThemeService)), ( __param(3, IWorkspaceContextService)), ( __param(4, IStorageService)), ( __param(5, IWorkbenchLayoutService)), ( __param(6, IContextMenuService)), ( __param(7, IContextKeyService)), ( __param(8, IConfigurationService)), ( __param(9, IHostService))], AuxiliaryStatusbarPart));
|
|
618
685
|
let StatusbarService = class StatusbarService extends MultiWindowParts {
|
|
619
686
|
constructor(instantiationService, storageService, themeService) {
|
|
620
687
|
super("workbench.statusBarService", themeService, storageService);
|