@codingame/monaco-vscode-view-title-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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-view-title-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
|
}
|
|
@@ -9,7 +9,7 @@ import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
|
9
9
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
10
10
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
11
11
|
import { createActionViewItem } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
12
|
-
import { MenuWorkbenchToolBar, WorkbenchToolBar } from 'vscode/vscode/vs/platform/actions/browser/toolbar';
|
|
12
|
+
import { MenuWorkbenchToolBar, HiddenItemStrategy, WorkbenchToolBar } from 'vscode/vscode/vs/platform/actions/browser/toolbar';
|
|
13
13
|
import { MenuId, SubmenuItemAction, MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
14
14
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
15
15
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
@@ -28,7 +28,7 @@ let CommandCenterControl = class CommandCenterControl {
|
|
|
28
28
|
this.element.classList.add('command-center');
|
|
29
29
|
const titleToolbar = instantiationService.createInstance(MenuWorkbenchToolBar, this.element, MenuId.CommandCenter, {
|
|
30
30
|
contextMenu: MenuId.TitleBarContext,
|
|
31
|
-
hiddenItemStrategy:
|
|
31
|
+
hiddenItemStrategy: HiddenItemStrategy.NoHide,
|
|
32
32
|
toolbarOptions: {
|
|
33
33
|
primaryGroup: () => true,
|
|
34
34
|
},
|
|
@@ -91,7 +91,7 @@ let CommandCenterCenterViewItem = class CommandCenterCenterViewItem extends Base
|
|
|
91
91
|
for (let i = 0; i < groups.length; i++) {
|
|
92
92
|
const group = groups[i];
|
|
93
93
|
const toolbar = this._instaService.createInstance(WorkbenchToolBar, container, {
|
|
94
|
-
hiddenItemStrategy:
|
|
94
|
+
hiddenItemStrategy: HiddenItemStrategy.NoHide,
|
|
95
95
|
telemetrySource: 'commandCenterCenter',
|
|
96
96
|
actionViewItemProvider: (action, options) => {
|
|
97
97
|
options = {
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
2
2
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
3
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
3
4
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
5
|
+
import { LayoutSettings } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
4
6
|
import { Action2, MenuId, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
5
7
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
6
8
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
7
9
|
import { ACCOUNTS_ACTIVITY_ID, GLOBAL_ACTIVITY_ID } from 'vscode/vscode/vs/workbench/common/activity';
|
|
8
10
|
import { IsAuxiliaryWindowFocusedContext, TitleBarStyleContext, IsMainWindowFullscreenContext, TitleBarVisibleContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
11
|
+
import { TitleBarSetting, TitlebarStyle, CustomTitleBarVisibility } from 'vscode/vscode/vs/platform/window/common/window';
|
|
9
12
|
|
|
10
13
|
const _moduleId = "vs/workbench/browser/parts/titlebar/titlebarActions";
|
|
11
14
|
class ToggleConfigAction extends Action2 {
|
|
@@ -41,7 +44,7 @@ class ToggleConfigAction extends Action2 {
|
|
|
41
44
|
}
|
|
42
45
|
registerAction2(class ToggleCommandCenter extends ToggleConfigAction {
|
|
43
46
|
constructor() {
|
|
44
|
-
super(
|
|
47
|
+
super(LayoutSettings.COMMAND_CENTER, ( localizeWithPath(_moduleId, 0, 'Command Center')), ( localizeWithPath(_moduleId, 1, "Toggle visibility of the Command Center in title bar")), 1, false);
|
|
45
48
|
}
|
|
46
49
|
});
|
|
47
50
|
registerAction2(class ToggleLayoutControl extends ToggleConfigAction {
|
|
@@ -52,23 +55,23 @@ registerAction2(class ToggleLayoutControl extends ToggleConfigAction {
|
|
|
52
55
|
registerAction2(class ToggleCustomTitleBar extends Action2 {
|
|
53
56
|
constructor() {
|
|
54
57
|
super({
|
|
55
|
-
id: `toggle.${
|
|
58
|
+
id: `toggle.${TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY}`,
|
|
56
59
|
title: ( localizeWithPath(_moduleId, 4, 'Hide Custom Title Bar')),
|
|
57
60
|
menu: [
|
|
58
|
-
{ id: MenuId.TitleBarContext, order: 0, when: ( (ContextKeyExpr.equals(TitleBarStyleContext.key,
|
|
59
|
-
{ id: MenuId.TitleBarTitleContext, order: 0, when: ( (ContextKeyExpr.equals(TitleBarStyleContext.key,
|
|
61
|
+
{ id: MenuId.TitleBarContext, order: 0, when: ( (ContextKeyExpr.equals(TitleBarStyleContext.key, TitlebarStyle.NATIVE))), group: '3_toggle' },
|
|
62
|
+
{ id: MenuId.TitleBarTitleContext, order: 0, when: ( (ContextKeyExpr.equals(TitleBarStyleContext.key, TitlebarStyle.NATIVE))), group: '3_toggle' },
|
|
60
63
|
]
|
|
61
64
|
});
|
|
62
65
|
}
|
|
63
66
|
run(accessor, ...args) {
|
|
64
67
|
const configService = accessor.get(IConfigurationService);
|
|
65
|
-
configService.updateValue(
|
|
68
|
+
configService.updateValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY, CustomTitleBarVisibility.NEVER);
|
|
66
69
|
}
|
|
67
70
|
});
|
|
68
71
|
registerAction2(class ToggleCustomTitleBarWindowed extends Action2 {
|
|
69
72
|
constructor() {
|
|
70
73
|
super({
|
|
71
|
-
id: `toggle.${
|
|
74
|
+
id: `toggle.${TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY}.windowed`,
|
|
72
75
|
title: ( localizeWithPath(_moduleId, 5, 'Hide Custom Title Bar In Full Screen')),
|
|
73
76
|
menu: [
|
|
74
77
|
{ id: MenuId.TitleBarContext, order: 1, when: IsMainWindowFullscreenContext, group: '3_toggle' },
|
|
@@ -78,7 +81,7 @@ registerAction2(class ToggleCustomTitleBarWindowed extends Action2 {
|
|
|
78
81
|
}
|
|
79
82
|
run(accessor, ...args) {
|
|
80
83
|
const configService = accessor.get(IConfigurationService);
|
|
81
|
-
configService.updateValue(
|
|
84
|
+
configService.updateValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY, CustomTitleBarVisibility.WINDOWED);
|
|
82
85
|
}
|
|
83
86
|
});
|
|
84
87
|
class ToggleCustomTitleBar extends Action2 {
|
|
@@ -92,7 +95,7 @@ class ToggleCustomTitleBar extends Action2 {
|
|
|
92
95
|
id: MenuId.MenubarAppearanceMenu,
|
|
93
96
|
order: 6,
|
|
94
97
|
when: ( (ContextKeyExpr.or( (ContextKeyExpr.and(
|
|
95
|
-
(ContextKeyExpr.equals(TitleBarStyleContext.key,
|
|
98
|
+
(ContextKeyExpr.equals(TitleBarStyleContext.key, TitlebarStyle.NATIVE)),
|
|
96
99
|
( (ContextKeyExpr.and(
|
|
97
100
|
(ContextKeyExpr.equals('config.workbench.layoutControl.enabled', false)),
|
|
98
101
|
(ContextKeyExpr.equals('config.window.commandCenter', false)),
|
|
@@ -109,24 +112,24 @@ class ToggleCustomTitleBar extends Action2 {
|
|
|
109
112
|
run(accessor, ...args) {
|
|
110
113
|
const configService = accessor.get(IConfigurationService);
|
|
111
114
|
const contextKeyService = accessor.get(IContextKeyService);
|
|
112
|
-
const titleBarVisibility = configService.getValue(
|
|
115
|
+
const titleBarVisibility = configService.getValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY);
|
|
113
116
|
switch (titleBarVisibility) {
|
|
114
|
-
case
|
|
115
|
-
configService.updateValue(
|
|
117
|
+
case CustomTitleBarVisibility.NEVER:
|
|
118
|
+
configService.updateValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY, CustomTitleBarVisibility.AUTO);
|
|
116
119
|
break;
|
|
117
|
-
case
|
|
120
|
+
case CustomTitleBarVisibility.WINDOWED: {
|
|
118
121
|
const isFullScreen = IsMainWindowFullscreenContext.evaluate(contextKeyService.getContext(null));
|
|
119
122
|
if (isFullScreen) {
|
|
120
|
-
configService.updateValue(
|
|
123
|
+
configService.updateValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY, CustomTitleBarVisibility.AUTO);
|
|
121
124
|
}
|
|
122
125
|
else {
|
|
123
|
-
configService.updateValue(
|
|
126
|
+
configService.updateValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY, CustomTitleBarVisibility.NEVER);
|
|
124
127
|
}
|
|
125
128
|
break;
|
|
126
129
|
}
|
|
127
|
-
case
|
|
130
|
+
case CustomTitleBarVisibility.AUTO:
|
|
128
131
|
default:
|
|
129
|
-
configService.updateValue(
|
|
132
|
+
configService.updateValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY, CustomTitleBarVisibility.NEVER);
|
|
130
133
|
break;
|
|
131
134
|
}
|
|
132
135
|
}
|
|
@@ -143,7 +146,7 @@ registerAction2(class ShowCustomTitleBar extends Action2 {
|
|
|
143
146
|
}
|
|
144
147
|
run(accessor, ...args) {
|
|
145
148
|
const configService = accessor.get(IConfigurationService);
|
|
146
|
-
configService.updateValue(
|
|
149
|
+
configService.updateValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY, CustomTitleBarVisibility.AUTO);
|
|
147
150
|
}
|
|
148
151
|
});
|
|
149
152
|
registerAction2(class HideCustomTitleBar extends Action2 {
|
|
@@ -157,7 +160,7 @@ registerAction2(class HideCustomTitleBar extends Action2 {
|
|
|
157
160
|
}
|
|
158
161
|
run(accessor, ...args) {
|
|
159
162
|
const configService = accessor.get(IConfigurationService);
|
|
160
|
-
configService.updateValue(
|
|
163
|
+
configService.updateValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY, CustomTitleBarVisibility.NEVER);
|
|
161
164
|
}
|
|
162
165
|
});
|
|
163
166
|
registerAction2(class HideCustomTitleBar extends Action2 {
|
|
@@ -171,7 +174,7 @@ registerAction2(class HideCustomTitleBar extends Action2 {
|
|
|
171
174
|
}
|
|
172
175
|
run(accessor, ...args) {
|
|
173
176
|
const configService = accessor.get(IConfigurationService);
|
|
174
|
-
configService.updateValue(
|
|
177
|
+
configService.updateValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY, CustomTitleBarVisibility.WINDOWED);
|
|
175
178
|
}
|
|
176
179
|
});
|
|
177
180
|
registerAction2(class ToggleEditorActions extends Action2 {
|
|
@@ -196,19 +199,19 @@ registerAction2(class ToggleEditorActions extends Action2 {
|
|
|
196
199
|
const storageService = accessor.get(IStorageService);
|
|
197
200
|
const location = configService.getValue(ToggleEditorActions.settingsID);
|
|
198
201
|
if (location === 'hidden') {
|
|
199
|
-
const showTabs = configService.getValue(
|
|
202
|
+
const showTabs = configService.getValue(LayoutSettings.EDITOR_TABS_MODE);
|
|
200
203
|
if (showTabs !== 'none') {
|
|
201
204
|
configService.updateValue(ToggleEditorActions.settingsID, 'titleBar');
|
|
202
205
|
}
|
|
203
206
|
else {
|
|
204
|
-
const storedValue = storageService.get(ToggleEditorActions.settingsID,
|
|
207
|
+
const storedValue = storageService.get(ToggleEditorActions.settingsID, StorageScope.PROFILE);
|
|
205
208
|
configService.updateValue(ToggleEditorActions.settingsID, storedValue ?? 'default');
|
|
206
209
|
}
|
|
207
|
-
storageService.remove(ToggleEditorActions.settingsID,
|
|
210
|
+
storageService.remove(ToggleEditorActions.settingsID, StorageScope.PROFILE);
|
|
208
211
|
}
|
|
209
212
|
else {
|
|
210
213
|
configService.updateValue(ToggleEditorActions.settingsID, 'hidden');
|
|
211
|
-
storageService.store(ToggleEditorActions.settingsID, location,
|
|
214
|
+
storageService.store(ToggleEditorActions.settingsID, location, StorageScope.PROFILE, StorageTarget.USER);
|
|
212
215
|
}
|
|
213
216
|
}
|
|
214
217
|
});
|
|
@@ -3,7 +3,7 @@ import './media/titlebarpart.css.js';
|
|
|
3
3
|
import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
4
4
|
import { MultiWindowParts, Part } from 'vscode/vscode/vs/workbench/browser/part';
|
|
5
5
|
import { isWCOEnabled, getZoomFactor } from 'vscode/vscode/vs/base/browser/browser';
|
|
6
|
-
import { getTitleBarStyle, hasNativeTitlebar, getMenuBarVisibility } from 'vscode/vscode/vs/platform/window/common/window';
|
|
6
|
+
import { DEFAULT_CUSTOM_TITLEBAR_HEIGHT, getTitleBarStyle, hasNativeTitlebar, getMenuBarVisibility } from 'vscode/vscode/vs/platform/window/common/window';
|
|
7
7
|
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
8
8
|
import { StandardMouseEvent } from 'vscode/vscode/vs/base/browser/mouseEvent';
|
|
9
9
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
@@ -14,11 +14,13 @@ import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
|
14
14
|
import { TITLE_BAR_INACTIVE_BACKGROUND, TITLE_BAR_ACTIVE_BACKGROUND, WORKBENCH_BACKGROUND, TITLE_BAR_INACTIVE_FOREGROUND, TITLE_BAR_ACTIVE_FOREGROUND, TITLE_BAR_BORDER } from 'vscode/vscode/vs/workbench/common/theme';
|
|
15
15
|
import { isWeb, isMacintosh, isWindows, isLinux, isNative, platformLocale } from 'vscode/vscode/vs/base/common/platform';
|
|
16
16
|
import { Color } from 'vscode/vscode/vs/base/common/color';
|
|
17
|
-
import { getActiveDocument, getWindow, getWindowId, append, $, prepend, addDisposableListener, EventType, EventHelper, isAncestor, reset, Dimension } from 'vscode/vscode/vs/base/browser/dom';
|
|
17
|
+
import { getActiveDocument, getWindow, getWindowId, append, $, prepend, addDisposableListener, EventType, EventHelper, isHTMLElement, isAncestor, reset, Dimension } from 'vscode/vscode/vs/base/browser/dom';
|
|
18
18
|
import { CustomMenubarControl } from 'vscode/vscode/vs/workbench/browser/parts/titlebar/menubarControl';
|
|
19
19
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
20
20
|
import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
21
|
+
import { StorageScope } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
21
22
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
23
|
+
import { LayoutSettings, EditorActionsLocation, EditorTabsMode, ActivityBarPosition, Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
22
24
|
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
23
25
|
import { createActionViewItem, createAndFillInActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
24
26
|
import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
@@ -33,11 +35,13 @@ import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommon
|
|
|
33
35
|
import { WorkbenchToolBar } from 'vscode/vscode/vs/platform/actions/browser/toolbar';
|
|
34
36
|
import { GLOBAL_ACTIVITY_ID, ACCOUNTS_ACTIVITY_ID } from 'vscode/vscode/vs/workbench/common/activity';
|
|
35
37
|
import { SimpleGlobalActivityActionViewItem, SimpleAccountActivityActionViewItem, isAccountsActionVisible, AccountsActivityActionViewItem } from 'vscode/vscode/vs/workbench/browser/parts/globalCompositeBar';
|
|
38
|
+
import { HoverPosition } from 'vscode/vscode/vs/base/browser/ui/hover/hoverWidget';
|
|
36
39
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
37
40
|
import { ActionRunner } from 'vscode/vscode/vs/base/common/actions';
|
|
38
41
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
39
|
-
import { prepareActions } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
42
|
+
import { ActionsOrientation, prepareActions } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
40
43
|
import { EDITOR_CORE_NAVIGATION_COMMANDS } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
44
|
+
import { AnchorAlignment } from 'vscode/vscode/vs/base/browser/ui/contextview/contextview';
|
|
41
45
|
import { EditorPane } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
42
46
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
43
47
|
import { EditorCommandsContextActionRunner } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorTabsControl';
|
|
@@ -120,7 +124,7 @@ BrowserTitleService = ( (__decorate([
|
|
|
120
124
|
], BrowserTitleService)));
|
|
121
125
|
let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
122
126
|
get minimumHeight() {
|
|
123
|
-
const value = this.isCommandCenterVisible || (isWeb && isWCOEnabled()) ?
|
|
127
|
+
const value = this.isCommandCenterVisible || (isWeb && isWCOEnabled()) ? DEFAULT_CUSTOM_TITLEBAR_HEIGHT : 30;
|
|
124
128
|
return value / (this.preventZoom ? getZoomFactor(getWindow(this.element)) : 1);
|
|
125
129
|
}
|
|
126
130
|
get maximumHeight() { return this.minimumHeight; }
|
|
@@ -193,14 +197,14 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
193
197
|
}
|
|
194
198
|
}
|
|
195
199
|
if (this.actionToolBar) {
|
|
196
|
-
const affectsLayoutControl = event.affectsConfiguration(
|
|
197
|
-
const affectsActivityControl = event.affectsConfiguration(
|
|
200
|
+
const affectsLayoutControl = event.affectsConfiguration(LayoutSettings.LAYOUT_ACTIONS);
|
|
201
|
+
const affectsActivityControl = event.affectsConfiguration(LayoutSettings.ACTIVITY_BAR_LOCATION);
|
|
198
202
|
if (affectsLayoutControl || affectsActivityControl) {
|
|
199
203
|
this.createActionToolBarMenus({ layoutActions: affectsLayoutControl, activityActions: affectsActivityControl });
|
|
200
204
|
this._onDidChange.fire(undefined);
|
|
201
205
|
}
|
|
202
206
|
}
|
|
203
|
-
if (event.affectsConfiguration(
|
|
207
|
+
if (event.affectsConfiguration(LayoutSettings.COMMAND_CENTER)) {
|
|
204
208
|
this.createTitle();
|
|
205
209
|
this._onDidChange.fire(undefined);
|
|
206
210
|
}
|
|
@@ -285,7 +289,7 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
285
289
|
this._register(addDisposableListener(this.rootContainer, EventType.CONTEXT_MENU, e => {
|
|
286
290
|
EventHelper.stop(e);
|
|
287
291
|
let targetMenu;
|
|
288
|
-
if (isMacintosh && e.target
|
|
292
|
+
if (isMacintosh && isHTMLElement(e.target) && isAncestor(e.target, this.title)) {
|
|
289
293
|
targetMenu = MenuId.TitleBarTitleContext;
|
|
290
294
|
}
|
|
291
295
|
else {
|
|
@@ -322,10 +326,10 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
322
326
|
actionViewItemProvider(action, options) {
|
|
323
327
|
if (!this.isAuxiliary) {
|
|
324
328
|
if (action.id === GLOBAL_ACTIVITY_ID) {
|
|
325
|
-
return this.instantiationService.createInstance(SimpleGlobalActivityActionViewItem, { position: () =>
|
|
329
|
+
return this.instantiationService.createInstance(SimpleGlobalActivityActionViewItem, { position: () => HoverPosition.BELOW }, options);
|
|
326
330
|
}
|
|
327
331
|
if (action.id === ACCOUNTS_ACTIVITY_ID) {
|
|
328
|
-
return this.instantiationService.createInstance(SimpleAccountActivityActionViewItem, { position: () =>
|
|
332
|
+
return this.instantiationService.createInstance(SimpleAccountActivityActionViewItem, { position: () => HoverPosition.BELOW }, options);
|
|
329
333
|
}
|
|
330
334
|
}
|
|
331
335
|
const activeEditorPane = this.editorGroupsContainer.activeGroup?.activeEditorPane;
|
|
@@ -345,11 +349,11 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
345
349
|
this.actionToolBarDisposable.clear();
|
|
346
350
|
this.actionToolBar = this.actionToolBarDisposable.add(this.instantiationService.createInstance(WorkbenchToolBar, this.actionToolBarElement, {
|
|
347
351
|
contextMenu: MenuId.TitleBarContext,
|
|
348
|
-
orientation:
|
|
352
|
+
orientation: ActionsOrientation.HORIZONTAL,
|
|
349
353
|
ariaLabel: ( localizeWithPath(_moduleId, 1, "Title actions")),
|
|
350
354
|
getKeyBinding: action => this.getKeybinding(action),
|
|
351
355
|
overflowBehavior: { maxItems: 9, exempted: [ACCOUNTS_ACTIVITY_ID, GLOBAL_ACTIVITY_ID, ...EDITOR_CORE_NAVIGATION_COMMANDS] },
|
|
352
|
-
anchorAlignmentProvider: () =>
|
|
356
|
+
anchorAlignmentProvider: () => AnchorAlignment.RIGHT,
|
|
353
357
|
telemetrySource: 'titlePart',
|
|
354
358
|
highlightToggledItems: this.editorActionsEnabled,
|
|
355
359
|
actionViewItemProvider: (action, options) => this.actionViewItemProvider(action, options),
|
|
@@ -415,7 +419,7 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
415
419
|
if (update.activityActions) {
|
|
416
420
|
this.activityToolbarDisposables.clear();
|
|
417
421
|
if (this.activityActionsEnabled) {
|
|
418
|
-
this.activityToolbarDisposables.add(this.storageService.onDidChangeValue(
|
|
422
|
+
this.activityToolbarDisposables.add(this.storageService.onDidChangeValue(StorageScope.PROFILE, AccountsActivityActionViewItem.ACCOUNTS_VISIBILITY_PREFERENCE_KEY, this._store)(() => updateToolBarActions()));
|
|
419
423
|
}
|
|
420
424
|
}
|
|
421
425
|
updateToolBarActions();
|
|
@@ -464,18 +468,19 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
464
468
|
return getMenuBarVisibility(this.configurationService);
|
|
465
469
|
}
|
|
466
470
|
get layoutControlEnabled() {
|
|
467
|
-
return !this.isAuxiliary && this.configurationService.getValue(
|
|
471
|
+
return !this.isAuxiliary && this.configurationService.getValue(LayoutSettings.LAYOUT_ACTIONS) !== false;
|
|
468
472
|
}
|
|
469
473
|
get isCommandCenterVisible() {
|
|
470
|
-
return this.configurationService.getValue(
|
|
474
|
+
return this.configurationService.getValue(LayoutSettings.COMMAND_CENTER) !== false;
|
|
471
475
|
}
|
|
472
476
|
get editorActionsEnabled() {
|
|
473
|
-
return this.editorGroupService.partOptions.editorActionsLocation ===
|
|
474
|
-
(
|
|
477
|
+
return this.editorGroupService.partOptions.editorActionsLocation === EditorActionsLocation.TITLEBAR ||
|
|
478
|
+
(this.editorGroupService.partOptions.editorActionsLocation === EditorActionsLocation.DEFAULT &&
|
|
479
|
+
this.editorGroupService.partOptions.showTabs === EditorTabsMode.NONE);
|
|
475
480
|
}
|
|
476
481
|
get activityActionsEnabled() {
|
|
477
|
-
const activityBarPosition = this.configurationService.getValue(
|
|
478
|
-
return !this.isAuxiliary && (
|
|
482
|
+
const activityBarPosition = this.configurationService.getValue(LayoutSettings.ACTIVITY_BAR_LOCATION);
|
|
483
|
+
return !this.isAuxiliary && (activityBarPosition === ActivityBarPosition.TOP || activityBarPosition === ActivityBarPosition.BOTTOM);
|
|
479
484
|
}
|
|
480
485
|
get hasZoomableElements() {
|
|
481
486
|
const hasMenubar = !(this.currentMenubarVisibility === 'hidden' || this.currentMenubarVisibility === 'compact' || (!isWeb && isMacintosh));
|
|
@@ -512,7 +517,7 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
512
517
|
}
|
|
513
518
|
toJSON() {
|
|
514
519
|
return {
|
|
515
|
-
type:
|
|
520
|
+
type: Parts.TITLEBAR_PART
|
|
516
521
|
};
|
|
517
522
|
}
|
|
518
523
|
dispose() {
|
|
@@ -537,7 +542,7 @@ BrowserTitlebarPart = ( (__decorate([
|
|
|
537
542
|
], BrowserTitlebarPart)));
|
|
538
543
|
let MainBrowserTitlebarPart = class MainBrowserTitlebarPart extends BrowserTitlebarPart {
|
|
539
544
|
constructor(contextMenuService, configurationService, environmentService, instantiationService, themeService, storageService, layoutService, contextKeyService, hostService, editorGroupService, editorService, menuService, keybindingService) {
|
|
540
|
-
super(
|
|
545
|
+
super(Parts.TITLEBAR_PART, mainWindow, 'main', contextMenuService, configurationService, environmentService, instantiationService, themeService, storageService, layoutService, contextKeyService, hostService, editorGroupService, editorService, menuService, keybindingService);
|
|
541
546
|
}
|
|
542
547
|
};
|
|
543
548
|
MainBrowserTitlebarPart = ( (__decorate([
|