@codingame/monaco-vscode-view-common-service-override 4.5.0-improve-code-splitting.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/assets/fake.html +10 -0
- package/assets/index-no-csp.html +1230 -0
- package/assets/index.html +1231 -0
- package/assets/service-worker.js +457 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/override/vs/workbench/browser/parts/editor/textEditor.js +5 -0
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +11 -0
- package/package.json +32 -0
- package/tools/editorAssets.js +4 -0
- package/tools/url.js +10 -0
- package/viewCommon.d.ts +5 -0
- package/viewCommon.js +105 -0
- package/vscode/src/vs/base/browser/deviceAccess.js +61 -0
- package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +180 -0
- package/vscode/src/vs/base/browser/ui/grid/grid.js +494 -0
- package/vscode/src/vs/base/browser/ui/grid/gridview.css.js +6 -0
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +1113 -0
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +12 -0
- package/vscode/src/vs/platform/webview/common/mimeTypes.js +24 -0
- package/vscode/src/vs/platform/webview/common/webviewPortMapping.js +64 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +907 -0
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +764 -0
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +301 -0
- package/vscode/src/vs/workbench/browser/media/style.css.js +6 -0
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +671 -0
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +6 -0
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css.js +6 -0
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +229 -0
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +6 -0
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +606 -0
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +346 -0
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +246 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +1403 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +188 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +523 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +1030 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +391 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/editordroptarget.css.js +6 -0
- package/vscode/src/vs/workbench/browser/parts/media/compositepart.css.js +6 -0
- package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css.js +6 -0
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +643 -0
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +472 -0
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +68 -0
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +160 -0
- package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +6 -0
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +39 -0
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +238 -0
- package/vscode/src/vs/workbench/browser/style.js +54 -0
- package/vscode/src/vs/workbench/browser/window.js +381 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +300 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +367 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +135 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +18 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +146 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +215 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +78 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +56 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +63 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +183 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +8 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +408 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +147 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +635 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +230 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +75 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.js +42 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +81 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +350 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +100 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +148 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +106 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +403 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +199 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/fixedZoneWidget.js +41 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +128 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +619 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +161 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +266 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +173 -0
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +195 -0
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +38 -0
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.js +41 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +283 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +362 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +133 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +314 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +96 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +98 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +656 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +65 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +59 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +143 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +121 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +67 -0
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +234 -0
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +45 -0
- package/vscode/src/vs/workbench/services/activity/browser/activityService.js +145 -0
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +341 -0
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +186 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +13 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +676 -0
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +1516 -0
- package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css.js +6 -0
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +527 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +102 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +133 -0
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +711 -0
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +603 -0
|
@@ -0,0 +1,671 @@
|
|
|
1
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
+
import './media/activitybarpart.css.js';
|
|
3
|
+
import './media/activityaction.css.js';
|
|
4
|
+
import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
5
|
+
import { Part } from 'vscode/vscode/vs/workbench/browser/part';
|
|
6
|
+
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
7
|
+
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
|
+
import { MutableDisposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
9
|
+
import { ToggleSidebarPositionAction } from 'vscode/vscode/vs/workbench/browser/actions/layoutActions';
|
|
10
|
+
import { registerThemingParticipant } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
11
|
+
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
12
|
+
import { ACTIVITY_BAR_FOREGROUND, ACTIVITY_BAR_INACTIVE_FOREGROUND, ACTIVITY_BAR_ACTIVE_BORDER, ACTIVITY_BAR_ACTIVE_BACKGROUND, ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_BADGE_FOREGROUND, ACTIVITY_BAR_DRAG_AND_DROP_BORDER, ACTIVITY_BAR_BACKGROUND, ACTIVITY_BAR_BORDER, ACTIVITY_BAR_ACTIVE_FOCUS_BORDER } from 'vscode/vscode/vs/workbench/common/theme';
|
|
13
|
+
import 'vscode/vscode/vs/platform/theme/common/colorUtils';
|
|
14
|
+
import { contrastBorder, activeContrastBorder, focusBorder } from 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
|
|
15
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/chartsColors';
|
|
16
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/editorColors';
|
|
17
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/inputColors';
|
|
18
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/listColors';
|
|
19
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/menuColors';
|
|
20
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
|
|
21
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
22
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
23
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
24
|
+
import { append, $, clearNode, isAncestor, addDisposableListener, EventType } from 'vscode/vscode/vs/base/browser/dom';
|
|
25
|
+
import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
|
|
26
|
+
import { CustomMenubarControl } from 'vscode/vscode/vs/workbench/browser/parts/titlebar/menubarControl';
|
|
27
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
28
|
+
import { getMenuBarVisibility } from 'vscode/vscode/vs/platform/window/common/window';
|
|
29
|
+
import { toAction, Separator, SubmenuAction } from 'vscode/vscode/vs/base/common/actions';
|
|
30
|
+
import { StandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
|
|
31
|
+
import { PaneCompositeBar } from '../paneCompositeBar.js';
|
|
32
|
+
import { GlobalCompositeBar } from 'vscode/vscode/vs/workbench/browser/parts/globalCompositeBar';
|
|
33
|
+
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
34
|
+
import { MenuId, registerAction2, Action2, MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
35
|
+
import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
|
|
36
|
+
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
37
|
+
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
38
|
+
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
39
|
+
import { createAndFillInContextMenuActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
40
|
+
import { ViewContainerLocationToString } from 'vscode/vscode/vs/workbench/common/views';
|
|
41
|
+
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
42
|
+
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
|
|
43
|
+
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
44
|
+
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
45
|
+
|
|
46
|
+
var ActivitybarPart_1;
|
|
47
|
+
let ActivitybarPart = class ActivitybarPart extends Part {
|
|
48
|
+
static { ActivitybarPart_1 = this; }
|
|
49
|
+
static { this.ACTION_HEIGHT = 48; }
|
|
50
|
+
static { this.pinnedViewContainersKey = 'workbench.activity.pinnedViewlets2'; }
|
|
51
|
+
static { this.placeholderViewContainersKey = 'workbench.activity.placeholderViewlets'; }
|
|
52
|
+
static { this.viewContainersWorkspaceStateKey = 'workbench.activity.viewletsWorkspaceState'; }
|
|
53
|
+
constructor(paneCompositePart, instantiationService, layoutService, themeService, storageService) {
|
|
54
|
+
super("workbench.parts.activitybar" , { hasTitle: false }, themeService, storageService, layoutService);
|
|
55
|
+
this.paneCompositePart = paneCompositePart;
|
|
56
|
+
this.instantiationService = instantiationService;
|
|
57
|
+
this.minimumWidth = 48;
|
|
58
|
+
this.maximumWidth = 48;
|
|
59
|
+
this.minimumHeight = 0;
|
|
60
|
+
this.maximumHeight = Number.POSITIVE_INFINITY;
|
|
61
|
+
this.compositeBar = this._register(( new MutableDisposable()));
|
|
62
|
+
}
|
|
63
|
+
createCompositeBar() {
|
|
64
|
+
return this.instantiationService.createInstance(ActivityBarCompositeBar, {
|
|
65
|
+
partContainerClass: 'activitybar',
|
|
66
|
+
pinnedViewContainersKey: ActivitybarPart_1.pinnedViewContainersKey,
|
|
67
|
+
placeholderViewContainersKey: ActivitybarPart_1.placeholderViewContainersKey,
|
|
68
|
+
viewContainersWorkspaceStateKey: ActivitybarPart_1.viewContainersWorkspaceStateKey,
|
|
69
|
+
orientation: 1 ,
|
|
70
|
+
icon: true,
|
|
71
|
+
iconSize: 24,
|
|
72
|
+
activityHoverOptions: {
|
|
73
|
+
position: () => this.layoutService.getSideBarPosition() === 0 ? 1 : 0 ,
|
|
74
|
+
},
|
|
75
|
+
preventLoopNavigation: true,
|
|
76
|
+
recomputeSizes: false,
|
|
77
|
+
fillExtraContextMenuActions: (actions, e) => { },
|
|
78
|
+
compositeSize: 52,
|
|
79
|
+
colors: (theme) => ({
|
|
80
|
+
activeForegroundColor: theme.getColor(ACTIVITY_BAR_FOREGROUND),
|
|
81
|
+
inactiveForegroundColor: theme.getColor(ACTIVITY_BAR_INACTIVE_FOREGROUND),
|
|
82
|
+
activeBorderColor: theme.getColor(ACTIVITY_BAR_ACTIVE_BORDER),
|
|
83
|
+
activeBackground: theme.getColor(ACTIVITY_BAR_ACTIVE_BACKGROUND),
|
|
84
|
+
badgeBackground: theme.getColor(ACTIVITY_BAR_BADGE_BACKGROUND),
|
|
85
|
+
badgeForeground: theme.getColor(ACTIVITY_BAR_BADGE_FOREGROUND),
|
|
86
|
+
dragAndDropBorder: theme.getColor(ACTIVITY_BAR_DRAG_AND_DROP_BORDER),
|
|
87
|
+
activeBackgroundColor: undefined, inactiveBackgroundColor: undefined, activeBorderBottomColor: undefined,
|
|
88
|
+
}),
|
|
89
|
+
overflowActionSize: ActivitybarPart_1.ACTION_HEIGHT,
|
|
90
|
+
}, "workbench.parts.activitybar" , this.paneCompositePart, true);
|
|
91
|
+
}
|
|
92
|
+
createContentArea(parent) {
|
|
93
|
+
this.element = parent;
|
|
94
|
+
this.content = append(this.element, $('.content'));
|
|
95
|
+
if (this.layoutService.isVisible("workbench.parts.activitybar" )) {
|
|
96
|
+
this.show();
|
|
97
|
+
}
|
|
98
|
+
return this.content;
|
|
99
|
+
}
|
|
100
|
+
getPinnedPaneCompositeIds() {
|
|
101
|
+
return this.compositeBar.value?.getPinnedPaneCompositeIds() ?? [];
|
|
102
|
+
}
|
|
103
|
+
getVisiblePaneCompositeIds() {
|
|
104
|
+
return this.compositeBar.value?.getVisiblePaneCompositeIds() ?? [];
|
|
105
|
+
}
|
|
106
|
+
focus() {
|
|
107
|
+
this.compositeBar.value?.focus();
|
|
108
|
+
}
|
|
109
|
+
updateStyles() {
|
|
110
|
+
super.updateStyles();
|
|
111
|
+
const container = assertIsDefined(this.getContainer());
|
|
112
|
+
const background = this.getColor(ACTIVITY_BAR_BACKGROUND) || '';
|
|
113
|
+
container.style.backgroundColor = background;
|
|
114
|
+
const borderColor = this.getColor(ACTIVITY_BAR_BORDER) || this.getColor(contrastBorder) || '';
|
|
115
|
+
container.classList.toggle('bordered', !!borderColor);
|
|
116
|
+
container.style.borderColor = borderColor ? borderColor : '';
|
|
117
|
+
}
|
|
118
|
+
show(focus) {
|
|
119
|
+
if (!this.content) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (!this.compositeBar.value) {
|
|
123
|
+
this.compositeBar.value = this.createCompositeBar();
|
|
124
|
+
this.compositeBar.value.create(this.content);
|
|
125
|
+
if (this.dimension) {
|
|
126
|
+
this.layout(this.dimension.width, this.dimension.height);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (focus) {
|
|
130
|
+
this.focus();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
hide() {
|
|
134
|
+
if (!this.compositeBar.value) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
this.compositeBar.clear();
|
|
138
|
+
if (this.content) {
|
|
139
|
+
clearNode(this.content);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
layout(width, height) {
|
|
143
|
+
super.layout(width, height, 0, 0);
|
|
144
|
+
if (!this.compositeBar.value) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const contentAreaSize = super.layoutContents(width, height).contentSize;
|
|
148
|
+
this.compositeBar.value.layout(width, contentAreaSize.height);
|
|
149
|
+
}
|
|
150
|
+
toJSON() {
|
|
151
|
+
return {
|
|
152
|
+
type: "workbench.parts.activitybar"
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
ActivitybarPart = ActivitybarPart_1 = ( __decorate([
|
|
157
|
+
( __param(1, IInstantiationService)),
|
|
158
|
+
( __param(2, IWorkbenchLayoutService)),
|
|
159
|
+
( __param(3, IThemeService)),
|
|
160
|
+
( __param(4, IStorageService))
|
|
161
|
+
], ActivitybarPart));
|
|
162
|
+
let ActivityBarCompositeBar = class ActivityBarCompositeBar extends PaneCompositeBar {
|
|
163
|
+
constructor(options, part, paneCompositePart, showGlobalActivities, instantiationService, storageService, extensionService, viewDescriptorService, contextKeyService, environmentService, configurationService, menuService, layoutService) {
|
|
164
|
+
super({
|
|
165
|
+
...options,
|
|
166
|
+
fillExtraContextMenuActions: (actions, e) => {
|
|
167
|
+
options.fillExtraContextMenuActions(actions, e);
|
|
168
|
+
this.fillContextMenuActions(actions, e);
|
|
169
|
+
}
|
|
170
|
+
}, part, paneCompositePart, instantiationService, storageService, extensionService, viewDescriptorService, contextKeyService, environmentService, layoutService);
|
|
171
|
+
this.configurationService = configurationService;
|
|
172
|
+
this.menuService = menuService;
|
|
173
|
+
this.keyboardNavigationDisposables = this._register(( new DisposableStore()));
|
|
174
|
+
if (showGlobalActivities) {
|
|
175
|
+
this.globalCompositeBar = this._register(instantiationService.createInstance(GlobalCompositeBar, () => this.getContextMenuActions(), (theme) => this.options.colors(theme), this.options.activityHoverOptions));
|
|
176
|
+
}
|
|
177
|
+
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
178
|
+
if (e.affectsConfiguration('window.menuBarVisibility')) {
|
|
179
|
+
if (getMenuBarVisibility(this.configurationService) === 'compact') {
|
|
180
|
+
this.installMenubar();
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
this.uninstallMenubar();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}));
|
|
187
|
+
}
|
|
188
|
+
fillContextMenuActions(actions, e) {
|
|
189
|
+
const menuBarVisibility = getMenuBarVisibility(this.configurationService);
|
|
190
|
+
if (menuBarVisibility === 'compact' || menuBarVisibility === 'hidden' || menuBarVisibility === 'toggle') {
|
|
191
|
+
actions.unshift(...[toAction({ id: 'toggleMenuVisibility', label: ( localizeWithPath('vs/workbench/browser/parts/activitybar/activitybarPart', 'menu', "Menu")), checked: menuBarVisibility === 'compact', run: () => this.configurationService.updateValue('window.menuBarVisibility', menuBarVisibility === 'compact' ? 'toggle' : 'compact') }), ( new Separator())]);
|
|
192
|
+
}
|
|
193
|
+
if (menuBarVisibility === 'compact' && this.menuBarContainer && e?.target) {
|
|
194
|
+
if (isAncestor(e.target, this.menuBarContainer)) {
|
|
195
|
+
actions.unshift(...[toAction({ id: 'hideCompactMenu', label: ( localizeWithPath(
|
|
196
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
197
|
+
'hideMenu',
|
|
198
|
+
"Hide Menu"
|
|
199
|
+
)), run: () => this.configurationService.updateValue('window.menuBarVisibility', 'toggle') }), ( new Separator())]);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
if (this.globalCompositeBar) {
|
|
203
|
+
actions.push(( new Separator()));
|
|
204
|
+
actions.push(...this.globalCompositeBar.getContextMenuActions());
|
|
205
|
+
}
|
|
206
|
+
actions.push(( new Separator()));
|
|
207
|
+
actions.push(...this.getActivityBarContextMenuActions());
|
|
208
|
+
}
|
|
209
|
+
uninstallMenubar() {
|
|
210
|
+
if (this.menuBar) {
|
|
211
|
+
this.menuBar.dispose();
|
|
212
|
+
this.menuBar = undefined;
|
|
213
|
+
}
|
|
214
|
+
if (this.menuBarContainer) {
|
|
215
|
+
this.menuBarContainer.remove();
|
|
216
|
+
this.menuBarContainer = undefined;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
installMenubar() {
|
|
220
|
+
if (this.menuBar) {
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
this.menuBarContainer = document.createElement('div');
|
|
224
|
+
this.menuBarContainer.classList.add('menubar');
|
|
225
|
+
const content = assertIsDefined(this.element);
|
|
226
|
+
content.prepend(this.menuBarContainer);
|
|
227
|
+
this.menuBar = this._register(this.instantiationService.createInstance(CustomMenubarControl));
|
|
228
|
+
this.menuBar.create(this.menuBarContainer);
|
|
229
|
+
}
|
|
230
|
+
registerKeyboardNavigationListeners() {
|
|
231
|
+
this.keyboardNavigationDisposables.clear();
|
|
232
|
+
if (this.menuBarContainer) {
|
|
233
|
+
this.keyboardNavigationDisposables.add(addDisposableListener(this.menuBarContainer, EventType.KEY_DOWN, e => {
|
|
234
|
+
const kbEvent = ( new StandardKeyboardEvent(e));
|
|
235
|
+
if (kbEvent.equals(18 ) || kbEvent.equals(17 )) {
|
|
236
|
+
this.focus();
|
|
237
|
+
}
|
|
238
|
+
}));
|
|
239
|
+
}
|
|
240
|
+
if (this.compositeBarContainer) {
|
|
241
|
+
this.keyboardNavigationDisposables.add(addDisposableListener(this.compositeBarContainer, EventType.KEY_DOWN, e => {
|
|
242
|
+
const kbEvent = ( new StandardKeyboardEvent(e));
|
|
243
|
+
if (kbEvent.equals(18 ) || kbEvent.equals(17 )) {
|
|
244
|
+
this.globalCompositeBar?.focus();
|
|
245
|
+
}
|
|
246
|
+
else if (kbEvent.equals(16 ) || kbEvent.equals(15 )) {
|
|
247
|
+
this.menuBar?.toggleFocus();
|
|
248
|
+
}
|
|
249
|
+
}));
|
|
250
|
+
}
|
|
251
|
+
if (this.globalCompositeBar) {
|
|
252
|
+
this.keyboardNavigationDisposables.add(addDisposableListener(this.globalCompositeBar.element, EventType.KEY_DOWN, e => {
|
|
253
|
+
const kbEvent = ( new StandardKeyboardEvent(e));
|
|
254
|
+
if (kbEvent.equals(16 ) || kbEvent.equals(15 )) {
|
|
255
|
+
this.focus(this.getVisiblePaneCompositeIds().length - 1);
|
|
256
|
+
}
|
|
257
|
+
}));
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
create(parent) {
|
|
261
|
+
this.element = parent;
|
|
262
|
+
if (getMenuBarVisibility(this.configurationService) === 'compact') {
|
|
263
|
+
this.installMenubar();
|
|
264
|
+
}
|
|
265
|
+
this.compositeBarContainer = super.create(this.element);
|
|
266
|
+
if (this.globalCompositeBar) {
|
|
267
|
+
this.globalCompositeBar.create(this.element);
|
|
268
|
+
}
|
|
269
|
+
this.registerKeyboardNavigationListeners();
|
|
270
|
+
return this.compositeBarContainer;
|
|
271
|
+
}
|
|
272
|
+
layout(width, height) {
|
|
273
|
+
if (this.menuBarContainer) {
|
|
274
|
+
if (this.options.orientation === 1 ) {
|
|
275
|
+
height -= this.menuBarContainer.clientHeight;
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
width -= this.menuBarContainer.clientWidth;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
if (this.globalCompositeBar) {
|
|
282
|
+
if (this.options.orientation === 1 ) {
|
|
283
|
+
height -= (this.globalCompositeBar.size() * ActivitybarPart.ACTION_HEIGHT);
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
width -= this.globalCompositeBar.element.clientWidth;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
super.layout(width, height);
|
|
290
|
+
}
|
|
291
|
+
getActivityBarContextMenuActions() {
|
|
292
|
+
const activityBarPositionMenu = this.menuService.createMenu(MenuId.ActivityBarPositionMenu, this.contextKeyService);
|
|
293
|
+
const positionActions = [];
|
|
294
|
+
createAndFillInContextMenuActions(activityBarPositionMenu, { shouldForwardArgs: true, renderShortTitle: true }, { primary: [], secondary: positionActions });
|
|
295
|
+
activityBarPositionMenu.dispose();
|
|
296
|
+
return [
|
|
297
|
+
( new SubmenuAction('workbench.action.panel.position', ( localizeWithPath(
|
|
298
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
299
|
+
'activity bar position',
|
|
300
|
+
"Activity Bar Position"
|
|
301
|
+
)), positionActions)),
|
|
302
|
+
toAction({ id: ToggleSidebarPositionAction.ID, label: ToggleSidebarPositionAction.getLabel(this.layoutService), run: () => this.instantiationService.invokeFunction(accessor => ( new ToggleSidebarPositionAction()).run(accessor)) })
|
|
303
|
+
];
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
ActivityBarCompositeBar = ( __decorate([
|
|
307
|
+
( __param(4, IInstantiationService)),
|
|
308
|
+
( __param(5, IStorageService)),
|
|
309
|
+
( __param(6, IExtensionService)),
|
|
310
|
+
( __param(7, IViewDescriptorService)),
|
|
311
|
+
( __param(8, IContextKeyService)),
|
|
312
|
+
( __param(9, IWorkbenchEnvironmentService)),
|
|
313
|
+
( __param(10, IConfigurationService)),
|
|
314
|
+
( __param(11, IMenuService)),
|
|
315
|
+
( __param(12, IWorkbenchLayoutService))
|
|
316
|
+
], ActivityBarCompositeBar));
|
|
317
|
+
registerAction2(class extends Action2 {
|
|
318
|
+
constructor() {
|
|
319
|
+
super({
|
|
320
|
+
id: 'workbench.action.activityBarLocation.default',
|
|
321
|
+
title: {
|
|
322
|
+
...( localize2WithPath(
|
|
323
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
324
|
+
'positionActivityBarDefault',
|
|
325
|
+
'Move Activity Bar to Side'
|
|
326
|
+
)),
|
|
327
|
+
mnemonicTitle: ( localizeWithPath(
|
|
328
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
329
|
+
{ key: 'miDefaultActivityBar', comment: ['&& denotes a mnemonic'] },
|
|
330
|
+
"&&Default"
|
|
331
|
+
)),
|
|
332
|
+
},
|
|
333
|
+
shortTitle: ( localizeWithPath(
|
|
334
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
335
|
+
'default',
|
|
336
|
+
"Default"
|
|
337
|
+
)),
|
|
338
|
+
category: Categories.View,
|
|
339
|
+
toggled: ( ContextKeyExpr.equals(
|
|
340
|
+
`config.${"workbench.activityBar.location" }`,
|
|
341
|
+
"default"
|
|
342
|
+
)),
|
|
343
|
+
menu: [{
|
|
344
|
+
id: MenuId.ActivityBarPositionMenu,
|
|
345
|
+
order: 1
|
|
346
|
+
}, {
|
|
347
|
+
id: MenuId.CommandPalette,
|
|
348
|
+
when: ( ContextKeyExpr.notEquals(
|
|
349
|
+
`config.${"workbench.activityBar.location" }`,
|
|
350
|
+
"default"
|
|
351
|
+
)),
|
|
352
|
+
}]
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
run(accessor) {
|
|
356
|
+
const configurationService = accessor.get(IConfigurationService);
|
|
357
|
+
configurationService.updateValue("workbench.activityBar.location" , "default" );
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
registerAction2(class extends Action2 {
|
|
361
|
+
constructor() {
|
|
362
|
+
super({
|
|
363
|
+
id: 'workbench.action.activityBarLocation.top',
|
|
364
|
+
title: {
|
|
365
|
+
...( localize2WithPath(
|
|
366
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
367
|
+
'positionActivityBarTop',
|
|
368
|
+
'Move Activity Bar to Top'
|
|
369
|
+
)),
|
|
370
|
+
mnemonicTitle: ( localizeWithPath(
|
|
371
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
372
|
+
{ key: 'miTopActivityBar', comment: ['&& denotes a mnemonic'] },
|
|
373
|
+
"&&Top"
|
|
374
|
+
)),
|
|
375
|
+
},
|
|
376
|
+
shortTitle: ( localizeWithPath('vs/workbench/browser/parts/activitybar/activitybarPart', 'top', "Top")),
|
|
377
|
+
category: Categories.View,
|
|
378
|
+
toggled: ( ContextKeyExpr.equals(
|
|
379
|
+
`config.${"workbench.activityBar.location" }`,
|
|
380
|
+
"top"
|
|
381
|
+
)),
|
|
382
|
+
menu: [{
|
|
383
|
+
id: MenuId.ActivityBarPositionMenu,
|
|
384
|
+
order: 2
|
|
385
|
+
}, {
|
|
386
|
+
id: MenuId.CommandPalette,
|
|
387
|
+
when: ( ContextKeyExpr.notEquals(
|
|
388
|
+
`config.${"workbench.activityBar.location" }`,
|
|
389
|
+
"top"
|
|
390
|
+
)),
|
|
391
|
+
}]
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
run(accessor) {
|
|
395
|
+
const configurationService = accessor.get(IConfigurationService);
|
|
396
|
+
configurationService.updateValue("workbench.activityBar.location" , "top" );
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
registerAction2(class extends Action2 {
|
|
400
|
+
constructor() {
|
|
401
|
+
super({
|
|
402
|
+
id: 'workbench.action.activityBarLocation.bottom',
|
|
403
|
+
title: {
|
|
404
|
+
...( localize2WithPath(
|
|
405
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
406
|
+
'positionActivityBarBottom',
|
|
407
|
+
'Move Activity Bar to Bottom'
|
|
408
|
+
)),
|
|
409
|
+
mnemonicTitle: ( localizeWithPath(
|
|
410
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
411
|
+
{ key: 'miBottomActivityBar', comment: ['&& denotes a mnemonic'] },
|
|
412
|
+
"&&Bottom"
|
|
413
|
+
)),
|
|
414
|
+
},
|
|
415
|
+
shortTitle: ( localizeWithPath(
|
|
416
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
417
|
+
'bottom',
|
|
418
|
+
"Bottom"
|
|
419
|
+
)),
|
|
420
|
+
category: Categories.View,
|
|
421
|
+
toggled: ( ContextKeyExpr.equals(
|
|
422
|
+
`config.${"workbench.activityBar.location" }`,
|
|
423
|
+
"bottom"
|
|
424
|
+
)),
|
|
425
|
+
menu: [{
|
|
426
|
+
id: MenuId.ActivityBarPositionMenu,
|
|
427
|
+
order: 3
|
|
428
|
+
}, {
|
|
429
|
+
id: MenuId.CommandPalette,
|
|
430
|
+
when: ( ContextKeyExpr.notEquals(
|
|
431
|
+
`config.${"workbench.activityBar.location" }`,
|
|
432
|
+
"bottom"
|
|
433
|
+
)),
|
|
434
|
+
}]
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
run(accessor) {
|
|
438
|
+
const configurationService = accessor.get(IConfigurationService);
|
|
439
|
+
configurationService.updateValue("workbench.activityBar.location" , "bottom" );
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
registerAction2(class extends Action2 {
|
|
443
|
+
constructor() {
|
|
444
|
+
super({
|
|
445
|
+
id: 'workbench.action.activityBarLocation.hide',
|
|
446
|
+
title: {
|
|
447
|
+
...( localize2WithPath(
|
|
448
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
449
|
+
'hideActivityBar',
|
|
450
|
+
'Hide Activity Bar'
|
|
451
|
+
)),
|
|
452
|
+
mnemonicTitle: ( localizeWithPath(
|
|
453
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
454
|
+
{ key: 'miHideActivityBar', comment: ['&& denotes a mnemonic'] },
|
|
455
|
+
"&&Hidden"
|
|
456
|
+
)),
|
|
457
|
+
},
|
|
458
|
+
shortTitle: ( localizeWithPath('vs/workbench/browser/parts/activitybar/activitybarPart', 'hide', "Hidden")),
|
|
459
|
+
category: Categories.View,
|
|
460
|
+
toggled: ( ContextKeyExpr.equals(
|
|
461
|
+
`config.${"workbench.activityBar.location" }`,
|
|
462
|
+
"hidden"
|
|
463
|
+
)),
|
|
464
|
+
menu: [{
|
|
465
|
+
id: MenuId.ActivityBarPositionMenu,
|
|
466
|
+
order: 4
|
|
467
|
+
}, {
|
|
468
|
+
id: MenuId.CommandPalette,
|
|
469
|
+
when: ( ContextKeyExpr.notEquals(
|
|
470
|
+
`config.${"workbench.activityBar.location" }`,
|
|
471
|
+
"hidden"
|
|
472
|
+
)),
|
|
473
|
+
}]
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
run(accessor) {
|
|
477
|
+
const configurationService = accessor.get(IConfigurationService);
|
|
478
|
+
configurationService.updateValue("workbench.activityBar.location" , "hidden" );
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
|
|
482
|
+
submenu: MenuId.ActivityBarPositionMenu,
|
|
483
|
+
title: ( localizeWithPath(
|
|
484
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
485
|
+
'positionActivituBar',
|
|
486
|
+
"Activity Bar Position"
|
|
487
|
+
)),
|
|
488
|
+
group: '3_workbench_layout_move',
|
|
489
|
+
order: 2
|
|
490
|
+
});
|
|
491
|
+
MenuRegistry.appendMenuItem(MenuId.ViewContainerTitleContext, {
|
|
492
|
+
submenu: MenuId.ActivityBarPositionMenu,
|
|
493
|
+
title: ( localizeWithPath(
|
|
494
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
495
|
+
'positionActivituBar',
|
|
496
|
+
"Activity Bar Position"
|
|
497
|
+
)),
|
|
498
|
+
when: ( ContextKeyExpr.equals(
|
|
499
|
+
'viewContainerLocation',
|
|
500
|
+
ViewContainerLocationToString(0 )
|
|
501
|
+
)),
|
|
502
|
+
group: '3_workbench_layout_move',
|
|
503
|
+
order: 1
|
|
504
|
+
});
|
|
505
|
+
MenuRegistry.appendMenuItem(MenuId.ViewTitleContext, {
|
|
506
|
+
submenu: MenuId.ActivityBarPositionMenu,
|
|
507
|
+
title: ( localizeWithPath(
|
|
508
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
509
|
+
'positionActivituBar',
|
|
510
|
+
"Activity Bar Position"
|
|
511
|
+
)),
|
|
512
|
+
when: ( ContextKeyExpr.equals(
|
|
513
|
+
'viewLocation',
|
|
514
|
+
ViewContainerLocationToString(0 )
|
|
515
|
+
)),
|
|
516
|
+
group: '3_workbench_layout_move',
|
|
517
|
+
order: 1
|
|
518
|
+
});
|
|
519
|
+
class SwitchSideBarViewAction extends Action2 {
|
|
520
|
+
constructor(desc, offset) {
|
|
521
|
+
super(desc);
|
|
522
|
+
this.offset = offset;
|
|
523
|
+
}
|
|
524
|
+
async run(accessor) {
|
|
525
|
+
const paneCompositeService = accessor.get(IPaneCompositePartService);
|
|
526
|
+
const visibleViewletIds = paneCompositeService.getVisiblePaneCompositeIds(0 );
|
|
527
|
+
const activeViewlet = paneCompositeService.getActivePaneComposite(0 );
|
|
528
|
+
if (!activeViewlet) {
|
|
529
|
+
return;
|
|
530
|
+
}
|
|
531
|
+
let targetViewletId;
|
|
532
|
+
for (let i = 0; i < visibleViewletIds.length; i++) {
|
|
533
|
+
if (visibleViewletIds[i] === activeViewlet.getId()) {
|
|
534
|
+
targetViewletId = visibleViewletIds[(i + visibleViewletIds.length + this.offset) % visibleViewletIds.length];
|
|
535
|
+
break;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
await paneCompositeService.openPaneComposite(targetViewletId, 0 , true);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
registerAction2(class PreviousSideBarViewAction extends SwitchSideBarViewAction {
|
|
542
|
+
constructor() {
|
|
543
|
+
super({
|
|
544
|
+
id: 'workbench.action.previousSideBarView',
|
|
545
|
+
title: ( localize2WithPath(
|
|
546
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
547
|
+
'previousSideBarView',
|
|
548
|
+
'Previous Primary Side Bar View'
|
|
549
|
+
)),
|
|
550
|
+
category: Categories.View,
|
|
551
|
+
f1: true
|
|
552
|
+
}, -1);
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
registerAction2(class NextSideBarViewAction extends SwitchSideBarViewAction {
|
|
556
|
+
constructor() {
|
|
557
|
+
super({
|
|
558
|
+
id: 'workbench.action.nextSideBarView',
|
|
559
|
+
title: ( localize2WithPath(
|
|
560
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
561
|
+
'nextSideBarView',
|
|
562
|
+
'Next Primary Side Bar View'
|
|
563
|
+
)),
|
|
564
|
+
category: Categories.View,
|
|
565
|
+
f1: true
|
|
566
|
+
}, 1);
|
|
567
|
+
}
|
|
568
|
+
});
|
|
569
|
+
registerAction2(class FocusActivityBarAction extends Action2 {
|
|
570
|
+
constructor() {
|
|
571
|
+
super({
|
|
572
|
+
id: 'workbench.action.focusActivityBar',
|
|
573
|
+
title: ( localize2WithPath(
|
|
574
|
+
'vs/workbench/browser/parts/activitybar/activitybarPart',
|
|
575
|
+
'focusActivityBar',
|
|
576
|
+
'Focus Activity Bar'
|
|
577
|
+
)),
|
|
578
|
+
category: Categories.View,
|
|
579
|
+
f1: true
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
async run(accessor) {
|
|
583
|
+
const layoutService = accessor.get(IWorkbenchLayoutService);
|
|
584
|
+
layoutService.focusPart("workbench.parts.activitybar" );
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
registerThemingParticipant((theme, collector) => {
|
|
588
|
+
const activityBarActiveBorderColor = theme.getColor(ACTIVITY_BAR_ACTIVE_BORDER);
|
|
589
|
+
if (activityBarActiveBorderColor) {
|
|
590
|
+
collector.addRule(`
|
|
591
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked .active-item-indicator:before {
|
|
592
|
+
border-left-color: ${activityBarActiveBorderColor};
|
|
593
|
+
}
|
|
594
|
+
`);
|
|
595
|
+
}
|
|
596
|
+
const activityBarActiveFocusBorderColor = theme.getColor(ACTIVITY_BAR_ACTIVE_FOCUS_BORDER);
|
|
597
|
+
if (activityBarActiveFocusBorderColor) {
|
|
598
|
+
collector.addRule(`
|
|
599
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:focus::before {
|
|
600
|
+
visibility: hidden;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:focus .active-item-indicator:before {
|
|
604
|
+
visibility: visible;
|
|
605
|
+
border-left-color: ${activityBarActiveFocusBorderColor};
|
|
606
|
+
}
|
|
607
|
+
`);
|
|
608
|
+
}
|
|
609
|
+
const activityBarActiveBackgroundColor = theme.getColor(ACTIVITY_BAR_ACTIVE_BACKGROUND);
|
|
610
|
+
if (activityBarActiveBackgroundColor) {
|
|
611
|
+
collector.addRule(`
|
|
612
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked .active-item-indicator {
|
|
613
|
+
z-index: 0;
|
|
614
|
+
background-color: ${activityBarActiveBackgroundColor};
|
|
615
|
+
}
|
|
616
|
+
`);
|
|
617
|
+
}
|
|
618
|
+
const outline = theme.getColor(activeContrastBorder);
|
|
619
|
+
if (outline) {
|
|
620
|
+
collector.addRule(`
|
|
621
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:before {
|
|
622
|
+
content: "";
|
|
623
|
+
position: absolute;
|
|
624
|
+
top: 8px;
|
|
625
|
+
left: 8px;
|
|
626
|
+
height: 32px;
|
|
627
|
+
width: 32px;
|
|
628
|
+
z-index: 1;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.profile-activity-item:before {
|
|
632
|
+
top: -6px;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:before,
|
|
636
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:hover:before,
|
|
637
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:before,
|
|
638
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:hover:before {
|
|
639
|
+
outline: 1px solid;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover:before {
|
|
643
|
+
outline: 1px dashed;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .active-item-indicator:before {
|
|
647
|
+
border-left-color: ${outline};
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:before,
|
|
651
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:hover:before,
|
|
652
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:before,
|
|
653
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:hover:before,
|
|
654
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover:before {
|
|
655
|
+
outline-color: ${outline};
|
|
656
|
+
}
|
|
657
|
+
`);
|
|
658
|
+
}
|
|
659
|
+
else {
|
|
660
|
+
const focusBorderColor = theme.getColor(focusBorder);
|
|
661
|
+
if (focusBorderColor) {
|
|
662
|
+
collector.addRule(`
|
|
663
|
+
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .active-item-indicator:before {
|
|
664
|
+
border-left-color: ${focusBorderColor};
|
|
665
|
+
}
|
|
666
|
+
`);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
|
|
671
|
+
export { ActivityBarCompositeBar, ActivitybarPart };
|