@codingame/monaco-vscode-view-title-bar-service-override 4.5.0 → 4.5.2
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/index.d.ts +1 -1
- package/package.json +2 -2
- package/vscode/src/vs/workbench/browser/parts/titlebar/commandCenterControl.js +20 -39
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarActions.js +35 -66
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.js +68 -75
- package/viewTitleBar.d.ts +0 -5
package/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '
|
|
1
|
+
export { default } from 'vscode/service-override/viewTitleBar';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-view-title-bar-service-override",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.2",
|
|
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@4.5.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@4.5.2"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -18,10 +18,11 @@ import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/
|
|
|
18
18
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
19
19
|
|
|
20
20
|
var CommandCenterCenterViewItem_1;
|
|
21
|
+
const _moduleId = "vs/workbench/browser/parts/titlebar/commandCenterControl";
|
|
21
22
|
let CommandCenterControl = class CommandCenterControl {
|
|
22
23
|
constructor(windowTitle, hoverDelegate, instantiationService, quickInputService) {
|
|
23
|
-
this._disposables = ( new DisposableStore());
|
|
24
|
-
this._onDidChangeVisibility = ( new Emitter());
|
|
24
|
+
this._disposables = ( (new DisposableStore()));
|
|
25
|
+
this._onDidChangeVisibility = ( (new Emitter()));
|
|
25
26
|
this.onDidChangeVisibility = this._onDidChangeVisibility.event;
|
|
26
27
|
this.element = document.createElement('div');
|
|
27
28
|
this.element.classList.add('command-center');
|
|
@@ -53,10 +54,10 @@ let CommandCenterControl = class CommandCenterControl {
|
|
|
53
54
|
this._disposables.dispose();
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
|
-
CommandCenterControl = ( __decorate([
|
|
57
|
-
( __param(2, IInstantiationService)),
|
|
58
|
-
( __param(3, IQuickInputService))
|
|
59
|
-
], CommandCenterControl));
|
|
57
|
+
CommandCenterControl = ( (__decorate([
|
|
58
|
+
( (__param(2, IInstantiationService))),
|
|
59
|
+
( (__param(3, IQuickInputService)))
|
|
60
|
+
], CommandCenterControl)));
|
|
60
61
|
let CommandCenterCenterViewItem = class CommandCenterCenterViewItem extends BaseActionViewItem {
|
|
61
62
|
static { CommandCenterCenterViewItem_1 = this; }
|
|
62
63
|
static { this._quickOpenCommandId = 'workbench.action.quickOpenWithModes'; }
|
|
@@ -142,29 +143,13 @@ let CommandCenterCenterViewItem = class CommandCenterCenterViewItem extends Base
|
|
|
142
143
|
label = that._windowTitle.fileName ?? label;
|
|
143
144
|
}
|
|
144
145
|
if (!label) {
|
|
145
|
-
label = ( localizeWithPath(
|
|
146
|
-
'vs/workbench/browser/parts/titlebar/commandCenterControl',
|
|
147
|
-
'label.dfl',
|
|
148
|
-
"Search"
|
|
149
|
-
));
|
|
146
|
+
label = ( localizeWithPath(_moduleId, 0, "Search"));
|
|
150
147
|
}
|
|
151
148
|
if (prefix) {
|
|
152
|
-
label = ( localizeWithPath(
|
|
153
|
-
'vs/workbench/browser/parts/titlebar/commandCenterControl',
|
|
154
|
-
'label1',
|
|
155
|
-
"{0} {1}",
|
|
156
|
-
prefix,
|
|
157
|
-
label
|
|
158
|
-
));
|
|
149
|
+
label = ( localizeWithPath(_moduleId, 1, "{0} {1}", prefix, label));
|
|
159
150
|
}
|
|
160
151
|
if (suffix) {
|
|
161
|
-
label = ( localizeWithPath(
|
|
162
|
-
'vs/workbench/browser/parts/titlebar/commandCenterControl',
|
|
163
|
-
'label2',
|
|
164
|
-
"{0} {1}",
|
|
165
|
-
label,
|
|
166
|
-
suffix
|
|
167
|
-
));
|
|
152
|
+
label = ( localizeWithPath(_moduleId, 2, "{0} {1}", label, suffix));
|
|
168
153
|
}
|
|
169
154
|
return label.replaceAll(/\r\n|\r|\n/g, '\u23CE');
|
|
170
155
|
}
|
|
@@ -186,16 +171,16 @@ let CommandCenterCenterViewItem = class CommandCenterCenterViewItem extends Base
|
|
|
186
171
|
const kb = this._keybindingService.lookupKeybinding(this.action.id)?.getLabel();
|
|
187
172
|
const title = kb
|
|
188
173
|
? ( localizeWithPath(
|
|
189
|
-
|
|
190
|
-
|
|
174
|
+
_moduleId,
|
|
175
|
+
3,
|
|
191
176
|
"Search {0} ({1}) \u2014 {2}",
|
|
192
177
|
this._windowTitle.workspaceName,
|
|
193
178
|
kb,
|
|
194
179
|
this._windowTitle.value
|
|
195
180
|
))
|
|
196
181
|
: ( localizeWithPath(
|
|
197
|
-
|
|
198
|
-
|
|
182
|
+
_moduleId,
|
|
183
|
+
4,
|
|
199
184
|
"Search {0} \u2014 {1}",
|
|
200
185
|
this._windowTitle.workspaceName,
|
|
201
186
|
this._windowTitle.value
|
|
@@ -203,18 +188,14 @@ let CommandCenterCenterViewItem = class CommandCenterCenterViewItem extends Base
|
|
|
203
188
|
return title;
|
|
204
189
|
}
|
|
205
190
|
};
|
|
206
|
-
CommandCenterCenterViewItem = CommandCenterCenterViewItem_1 = ( __decorate([
|
|
207
|
-
( __param(3, IKeybindingService)),
|
|
208
|
-
( __param(4, IInstantiationService)),
|
|
209
|
-
( __param(5, IEditorGroupsService))
|
|
210
|
-
], CommandCenterCenterViewItem));
|
|
191
|
+
CommandCenterCenterViewItem = CommandCenterCenterViewItem_1 = ( (__decorate([
|
|
192
|
+
( (__param(3, IKeybindingService))),
|
|
193
|
+
( (__param(4, IInstantiationService))),
|
|
194
|
+
( (__param(5, IEditorGroupsService)))
|
|
195
|
+
], CommandCenterCenterViewItem)));
|
|
211
196
|
MenuRegistry.appendMenuItem(MenuId.CommandCenter, {
|
|
212
197
|
submenu: MenuId.CommandCenterCenter,
|
|
213
|
-
title: ( localizeWithPath(
|
|
214
|
-
'vs/workbench/browser/parts/titlebar/commandCenterControl',
|
|
215
|
-
'title3',
|
|
216
|
-
"Command Center"
|
|
217
|
-
)),
|
|
198
|
+
title: ( localizeWithPath(_moduleId, 5, "Command Center")),
|
|
218
199
|
icon: Codicon.shield,
|
|
219
200
|
order: 101,
|
|
220
201
|
});
|
|
@@ -7,13 +7,14 @@ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/
|
|
|
7
7
|
import { ACCOUNTS_ACTIVITY_ID, GLOBAL_ACTIVITY_ID } from 'vscode/vscode/vs/workbench/common/activity';
|
|
8
8
|
import { IsAuxiliaryWindowFocusedContext, TitleBarStyleContext, IsMainWindowFullscreenContext, TitleBarVisibleContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
9
9
|
|
|
10
|
+
const _moduleId = "vs/workbench/browser/parts/titlebar/titlebarActions";
|
|
10
11
|
class ToggleConfigAction extends Action2 {
|
|
11
12
|
constructor(section, title, order, mainWindowOnly) {
|
|
12
|
-
const when = mainWindowOnly ? ( IsAuxiliaryWindowFocusedContext.toNegated()) : ContextKeyExpr.true();
|
|
13
|
+
const when = mainWindowOnly ? ( (IsAuxiliaryWindowFocusedContext.toNegated())) : ContextKeyExpr.true();
|
|
13
14
|
super({
|
|
14
15
|
id: `toggle.${section}`,
|
|
15
16
|
title,
|
|
16
|
-
toggled: ( ContextKeyExpr.equals(`config.${section}`, true)),
|
|
17
|
+
toggled: ( (ContextKeyExpr.equals(`config.${section}`, true))),
|
|
17
18
|
menu: [
|
|
18
19
|
{
|
|
19
20
|
id: MenuId.TitleBarContext,
|
|
@@ -39,34 +40,22 @@ class ToggleConfigAction extends Action2 {
|
|
|
39
40
|
}
|
|
40
41
|
registerAction2(class ToggleCommandCenter extends ToggleConfigAction {
|
|
41
42
|
constructor() {
|
|
42
|
-
super("window.commandCenter" , ( localizeWithPath(
|
|
43
|
-
'vs/workbench/browser/parts/titlebar/titlebarActions',
|
|
44
|
-
'toggle.commandCenter',
|
|
45
|
-
'Command Center'
|
|
46
|
-
)), 1, false);
|
|
43
|
+
super("window.commandCenter" , ( localizeWithPath(_moduleId, 0, 'Command Center')), 1, false);
|
|
47
44
|
}
|
|
48
45
|
});
|
|
49
46
|
registerAction2(class ToggleLayoutControl extends ToggleConfigAction {
|
|
50
47
|
constructor() {
|
|
51
|
-
super('workbench.layoutControl.enabled', ( localizeWithPath(
|
|
52
|
-
'vs/workbench/browser/parts/titlebar/titlebarActions',
|
|
53
|
-
'toggle.layout',
|
|
54
|
-
'Layout Controls'
|
|
55
|
-
)), 2, true);
|
|
48
|
+
super('workbench.layoutControl.enabled', ( localizeWithPath(_moduleId, 1, 'Layout Controls')), 2, true);
|
|
56
49
|
}
|
|
57
50
|
});
|
|
58
51
|
registerAction2(class ToggleCustomTitleBar extends Action2 {
|
|
59
52
|
constructor() {
|
|
60
53
|
super({
|
|
61
54
|
id: `toggle.${"window.customTitleBarVisibility" }`,
|
|
62
|
-
title: ( localizeWithPath(
|
|
63
|
-
'vs/workbench/browser/parts/titlebar/titlebarActions',
|
|
64
|
-
'toggle.hideCustomTitleBar',
|
|
65
|
-
'Hide Custom Title Bar'
|
|
66
|
-
)),
|
|
55
|
+
title: ( localizeWithPath(_moduleId, 2, 'Hide Custom Title Bar')),
|
|
67
56
|
menu: [
|
|
68
|
-
{ id: MenuId.TitleBarContext, order: 0, when: ( ContextKeyExpr.equals(TitleBarStyleContext.key, "native" )), group: '3_toggle' },
|
|
69
|
-
{ id: MenuId.TitleBarTitleContext, order: 0, when: ( ContextKeyExpr.equals(TitleBarStyleContext.key, "native" )), group: '3_toggle' },
|
|
57
|
+
{ id: MenuId.TitleBarContext, order: 0, when: ( (ContextKeyExpr.equals(TitleBarStyleContext.key, "native" ))), group: '3_toggle' },
|
|
58
|
+
{ id: MenuId.TitleBarTitleContext, order: 0, when: ( (ContextKeyExpr.equals(TitleBarStyleContext.key, "native" ))), group: '3_toggle' },
|
|
70
59
|
]
|
|
71
60
|
});
|
|
72
61
|
}
|
|
@@ -79,11 +68,7 @@ registerAction2(class ToggleCustomTitleBarWindowed extends Action2 {
|
|
|
79
68
|
constructor() {
|
|
80
69
|
super({
|
|
81
70
|
id: `toggle.${"window.customTitleBarVisibility" }.windowed`,
|
|
82
|
-
title: ( localizeWithPath(
|
|
83
|
-
'vs/workbench/browser/parts/titlebar/titlebarActions',
|
|
84
|
-
'toggle.hideCustomTitleBarInFullScreen',
|
|
85
|
-
'Hide Custom Title Bar In Full Screen'
|
|
86
|
-
)),
|
|
71
|
+
title: ( localizeWithPath(_moduleId, 3, 'Hide Custom Title Bar In Full Screen')),
|
|
87
72
|
menu: [
|
|
88
73
|
{ id: MenuId.TitleBarContext, order: 1, when: IsMainWindowFullscreenContext, group: '3_toggle' },
|
|
89
74
|
{ id: MenuId.TitleBarTitleContext, order: 1, when: IsMainWindowFullscreenContext, group: '3_toggle' },
|
|
@@ -99,17 +84,22 @@ class ToggleCustomTitleBar extends Action2 {
|
|
|
99
84
|
constructor() {
|
|
100
85
|
super({
|
|
101
86
|
id: `toggle.toggleCustomTitleBar`,
|
|
102
|
-
title: ( localizeWithPath(
|
|
103
|
-
'vs/workbench/browser/parts/titlebar/titlebarActions',
|
|
104
|
-
'toggle.customTitleBar',
|
|
105
|
-
'Custom Title Bar'
|
|
106
|
-
)),
|
|
87
|
+
title: ( localizeWithPath(_moduleId, 4, 'Custom Title Bar')),
|
|
107
88
|
toggled: TitleBarVisibleContext,
|
|
108
89
|
menu: [
|
|
109
90
|
{
|
|
110
91
|
id: MenuId.MenubarAppearanceMenu,
|
|
111
92
|
order: 6,
|
|
112
|
-
when: ( ContextKeyExpr.or(
|
|
93
|
+
when: ( (ContextKeyExpr.or( (ContextKeyExpr.and(
|
|
94
|
+
(ContextKeyExpr.equals(TitleBarStyleContext.key, "native" )),
|
|
95
|
+
( (ContextKeyExpr.and(
|
|
96
|
+
(ContextKeyExpr.equals('config.workbench.layoutControl.enabled', false)),
|
|
97
|
+
(ContextKeyExpr.equals('config.window.commandCenter', false)),
|
|
98
|
+
(ContextKeyExpr.notEquals('config.workbench.editor.editorActionsLocation', 'titleBar')),
|
|
99
|
+
(ContextKeyExpr.notEquals('config.workbench.activityBar.location', 'top')),
|
|
100
|
+
(ContextKeyExpr.notEquals('config.workbench.activityBar.location', 'bottom'))
|
|
101
|
+
)))?.negate()
|
|
102
|
+
)), IsMainWindowFullscreenContext))),
|
|
113
103
|
group: '2_workbench_layout'
|
|
114
104
|
},
|
|
115
105
|
],
|
|
@@ -145,12 +135,8 @@ registerAction2(class ShowCustomTitleBar extends Action2 {
|
|
|
145
135
|
constructor() {
|
|
146
136
|
super({
|
|
147
137
|
id: `showCustomTitleBar`,
|
|
148
|
-
title: ( localize2WithPath(
|
|
149
|
-
|
|
150
|
-
'showCustomTitleBar',
|
|
151
|
-
"Show Custom Title Bar"
|
|
152
|
-
)),
|
|
153
|
-
precondition: ( TitleBarVisibleContext.negate()),
|
|
138
|
+
title: ( localize2WithPath(_moduleId, 5, "Show Custom Title Bar")),
|
|
139
|
+
precondition: ( (TitleBarVisibleContext.negate())),
|
|
154
140
|
f1: true
|
|
155
141
|
});
|
|
156
142
|
}
|
|
@@ -163,11 +149,7 @@ registerAction2(class HideCustomTitleBar extends Action2 {
|
|
|
163
149
|
constructor() {
|
|
164
150
|
super({
|
|
165
151
|
id: `hideCustomTitleBar`,
|
|
166
|
-
title: ( localize2WithPath(
|
|
167
|
-
'vs/workbench/browser/parts/titlebar/titlebarActions',
|
|
168
|
-
'hideCustomTitleBar',
|
|
169
|
-
"Hide Custom Title Bar"
|
|
170
|
-
)),
|
|
152
|
+
title: ( localize2WithPath(_moduleId, 6, "Hide Custom Title Bar")),
|
|
171
153
|
precondition: TitleBarVisibleContext,
|
|
172
154
|
f1: true
|
|
173
155
|
});
|
|
@@ -181,12 +163,8 @@ registerAction2(class HideCustomTitleBar extends Action2 {
|
|
|
181
163
|
constructor() {
|
|
182
164
|
super({
|
|
183
165
|
id: `hideCustomTitleBarInFullScreen`,
|
|
184
|
-
title: ( localize2WithPath(
|
|
185
|
-
|
|
186
|
-
'hideCustomTitleBarInFullScreen',
|
|
187
|
-
"Hide Custom Title Bar In Full Screen"
|
|
188
|
-
)),
|
|
189
|
-
precondition: ( ContextKeyExpr.and(TitleBarVisibleContext, IsMainWindowFullscreenContext)),
|
|
166
|
+
title: ( localize2WithPath(_moduleId, 7, "Hide Custom Title Bar In Full Screen")),
|
|
167
|
+
precondition: ( (ContextKeyExpr.and(TitleBarVisibleContext, IsMainWindowFullscreenContext))),
|
|
190
168
|
f1: true
|
|
191
169
|
});
|
|
192
170
|
}
|
|
@@ -198,15 +176,14 @@ registerAction2(class HideCustomTitleBar extends Action2 {
|
|
|
198
176
|
registerAction2(class ToggleEditorActions extends Action2 {
|
|
199
177
|
static { this.settingsID = `workbench.editor.editorActionsLocation`; }
|
|
200
178
|
constructor() {
|
|
201
|
-
const titleBarContextCondition = ( ContextKeyExpr.and(
|
|
179
|
+
const titleBarContextCondition = ( (ContextKeyExpr.and(
|
|
180
|
+
(( (ContextKeyExpr.equals(`config.workbench.editor.showTabs`, 'none'))).negate()),
|
|
181
|
+
(ContextKeyExpr.equals(`config.${ToggleEditorActions.settingsID}`, 'default'))
|
|
182
|
+
)))?.negate();
|
|
202
183
|
super({
|
|
203
184
|
id: `toggle.${ToggleEditorActions.settingsID}`,
|
|
204
|
-
title: ( localizeWithPath(
|
|
205
|
-
|
|
206
|
-
'toggle.editorActions',
|
|
207
|
-
'Editor Actions'
|
|
208
|
-
)),
|
|
209
|
-
toggled: ( ( ContextKeyExpr.equals(`config.${ToggleEditorActions.settingsID}`, 'hidden')).negate()),
|
|
185
|
+
title: ( localizeWithPath(_moduleId, 8, 'Editor Actions')),
|
|
186
|
+
toggled: ( (( (ContextKeyExpr.equals(`config.${ToggleEditorActions.settingsID}`, 'hidden'))).negate())),
|
|
210
187
|
menu: [
|
|
211
188
|
{ id: MenuId.TitleBarContext, order: 3, when: titleBarContextCondition, group: '2_config' },
|
|
212
189
|
{ id: MenuId.TitleBarTitleContext, order: 3, when: titleBarContextCondition, group: '2_config' }
|
|
@@ -236,24 +213,16 @@ registerAction2(class ToggleEditorActions extends Action2 {
|
|
|
236
213
|
});
|
|
237
214
|
const ACCOUNTS_ACTIVITY_TILE_ACTION = {
|
|
238
215
|
id: ACCOUNTS_ACTIVITY_ID,
|
|
239
|
-
label: ( localizeWithPath(
|
|
240
|
-
|
|
241
|
-
'accounts',
|
|
242
|
-
"Accounts"
|
|
243
|
-
)),
|
|
244
|
-
tooltip: ( localizeWithPath(
|
|
245
|
-
'vs/workbench/browser/parts/titlebar/titlebarActions',
|
|
246
|
-
'accounts',
|
|
247
|
-
"Accounts"
|
|
248
|
-
)),
|
|
216
|
+
label: ( localizeWithPath(_moduleId, 9, "Accounts")),
|
|
217
|
+
tooltip: ( localizeWithPath(_moduleId, 9, "Accounts")),
|
|
249
218
|
class: undefined,
|
|
250
219
|
enabled: true,
|
|
251
220
|
run: function () { }
|
|
252
221
|
};
|
|
253
222
|
const GLOBAL_ACTIVITY_TITLE_ACTION = {
|
|
254
223
|
id: GLOBAL_ACTIVITY_ID,
|
|
255
|
-
label: ( localizeWithPath(
|
|
256
|
-
tooltip: ( localizeWithPath(
|
|
224
|
+
label: ( localizeWithPath(_moduleId, 10, "Manage")),
|
|
225
|
+
tooltip: ( localizeWithPath(_moduleId, 10, "Manage")),
|
|
257
226
|
class: undefined,
|
|
258
227
|
enabled: true,
|
|
259
228
|
run: function () { }
|
|
@@ -46,6 +46,7 @@ import { ACCOUNTS_ACTIVITY_TILE_ACTION, GLOBAL_ACTIVITY_TITLE_ACTION } from './t
|
|
|
46
46
|
import { createInstantHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
47
47
|
|
|
48
48
|
var AuxiliaryBrowserTitlebarPart_1;
|
|
49
|
+
const _moduleId = "vs/workbench/browser/parts/titlebar/titlebarPart";
|
|
49
50
|
let BrowserTitleService = class BrowserTitleService extends MultiWindowParts {
|
|
50
51
|
constructor(instantiationService, storageService, themeService) {
|
|
51
52
|
super('workbench.titleService', themeService, storageService);
|
|
@@ -66,11 +67,7 @@ let BrowserTitleService = class BrowserTitleService extends MultiWindowParts {
|
|
|
66
67
|
constructor() {
|
|
67
68
|
super({
|
|
68
69
|
id: `workbench.action.focusTitleBar`,
|
|
69
|
-
title: ( localize2WithPath(
|
|
70
|
-
'vs/workbench/browser/parts/titlebar/titlebarPart',
|
|
71
|
-
'focusTitleBar',
|
|
72
|
-
'Focus Title Bar'
|
|
73
|
-
)),
|
|
70
|
+
title: ( localize2WithPath(_moduleId, 0, 'Focus Title Bar')),
|
|
74
71
|
category: Categories.View,
|
|
75
72
|
f1: true,
|
|
76
73
|
});
|
|
@@ -86,7 +83,7 @@ let BrowserTitleService = class BrowserTitleService extends MultiWindowParts {
|
|
|
86
83
|
titlebarPartContainer.setAttribute('role', 'none');
|
|
87
84
|
titlebarPartContainer.style.position = 'relative';
|
|
88
85
|
container.insertBefore(titlebarPartContainer, container.firstChild);
|
|
89
|
-
const disposables = ( new DisposableStore());
|
|
86
|
+
const disposables = ( (new DisposableStore()));
|
|
90
87
|
const titlebarPart = this.doCreateAuxiliaryTitlebarPart(titlebarPartContainer, editorGroupsContainer);
|
|
91
88
|
disposables.add(this.registerPart(titlebarPart));
|
|
92
89
|
disposables.add(Event.runAndSubscribe(titlebarPart.onDidChange, () => titlebarPartContainer.style.height = `${titlebarPart.height}px`));
|
|
@@ -116,11 +113,11 @@ let BrowserTitleService = class BrowserTitleService extends MultiWindowParts {
|
|
|
116
113
|
}
|
|
117
114
|
}
|
|
118
115
|
};
|
|
119
|
-
BrowserTitleService = ( __decorate([
|
|
120
|
-
( __param(0, IInstantiationService)),
|
|
121
|
-
( __param(1, IStorageService)),
|
|
122
|
-
( __param(2, IThemeService))
|
|
123
|
-
], BrowserTitleService));
|
|
116
|
+
BrowserTitleService = ( (__decorate([
|
|
117
|
+
( (__param(0, IInstantiationService))),
|
|
118
|
+
( (__param(1, IStorageService))),
|
|
119
|
+
( (__param(2, IThemeService)))
|
|
120
|
+
], BrowserTitleService)));
|
|
124
121
|
let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
125
122
|
get minimumHeight() {
|
|
126
123
|
const value = this.isCommandCenterVisible || (isWeb && isWCOEnabled()) ? 35 : 30;
|
|
@@ -140,15 +137,15 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
140
137
|
this.keybindingService = keybindingService;
|
|
141
138
|
this.minimumWidth = 0;
|
|
142
139
|
this.maximumWidth = Number.POSITIVE_INFINITY;
|
|
143
|
-
this._onMenubarVisibilityChange = this._register(( new Emitter()));
|
|
140
|
+
this._onMenubarVisibilityChange = this._register(( (new Emitter())));
|
|
144
141
|
this.onMenubarVisibilityChange = this._onMenubarVisibilityChange.event;
|
|
145
|
-
this._onWillDispose = this._register(( new Emitter()));
|
|
142
|
+
this._onWillDispose = this._register(( (new Emitter())));
|
|
146
143
|
this.onWillDispose = this._onWillDispose.event;
|
|
147
|
-
this.actionToolBarDisposable = this._register(( new DisposableStore()));
|
|
148
|
-
this.editorActionsChangeDisposable = this._register(( new DisposableStore()));
|
|
149
|
-
this.editorToolbarMenuDisposables = this._register(( new DisposableStore()));
|
|
150
|
-
this.layoutToolbarMenuDisposables = this._register(( new DisposableStore()));
|
|
151
|
-
this.titleDisposables = this._register(( new DisposableStore()));
|
|
144
|
+
this.actionToolBarDisposable = this._register(( (new DisposableStore())));
|
|
145
|
+
this.editorActionsChangeDisposable = this._register(( (new DisposableStore())));
|
|
146
|
+
this.editorToolbarMenuDisposables = this._register(( (new DisposableStore())));
|
|
147
|
+
this.layoutToolbarMenuDisposables = this._register(( (new DisposableStore())));
|
|
148
|
+
this.titleDisposables = this._register(( (new DisposableStore())));
|
|
152
149
|
this.titleBarStyle = getTitleBarStyle(this.configurationService);
|
|
153
150
|
this.isInactive = false;
|
|
154
151
|
this.isAuxiliary = editorGroupsContainer !== 'main';
|
|
@@ -347,11 +344,7 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
347
344
|
this.actionToolBar = this.actionToolBarDisposable.add(this.instantiationService.createInstance(WorkbenchToolBar, this.actionToolBarElement, {
|
|
348
345
|
contextMenu: MenuId.TitleBarContext,
|
|
349
346
|
orientation: 0 ,
|
|
350
|
-
ariaLabel: ( localizeWithPath(
|
|
351
|
-
'vs/workbench/browser/parts/titlebar/titlebarPart',
|
|
352
|
-
'ariaLabelTitleActions',
|
|
353
|
-
"Title actions"
|
|
354
|
-
)),
|
|
347
|
+
ariaLabel: ( localizeWithPath(_moduleId, 1, "Title actions")),
|
|
355
348
|
getKeyBinding: action => this.getKeybinding(action),
|
|
356
349
|
overflowBehavior: { maxItems: 9, exempted: [ACCOUNTS_ACTIVITY_ID, GLOBAL_ACTIVITY_ID, ...EDITOR_CORE_NAVIGATION_COMMANDS] },
|
|
357
350
|
anchorAlignmentProvider: () => 1 ,
|
|
@@ -394,12 +387,12 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
394
387
|
this.editorToolbarMenuDisposables.clear();
|
|
395
388
|
if (this.editorActionsEnabled && this.editorService.activeEditor !== undefined) {
|
|
396
389
|
const context = { groupId: this.editorGroupsContainer.activeGroup.id };
|
|
397
|
-
this.actionToolBar.actionRunner = ( new EditorCommandsContextActionRunner(context));
|
|
390
|
+
this.actionToolBar.actionRunner = ( (new EditorCommandsContextActionRunner(context)));
|
|
398
391
|
this.actionToolBar.context = context;
|
|
399
392
|
this.editorToolbarMenuDisposables.add(this.actionToolBar.actionRunner);
|
|
400
393
|
}
|
|
401
394
|
else {
|
|
402
|
-
this.actionToolBar.actionRunner = ( new ActionRunner());
|
|
395
|
+
this.actionToolBar.actionRunner = ( (new ActionRunner()));
|
|
403
396
|
this.actionToolBar.context = {};
|
|
404
397
|
this.editorToolbarMenuDisposables.add(this.actionToolBar.actionRunner);
|
|
405
398
|
}
|
|
@@ -433,7 +426,7 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
433
426
|
if (this.appIconBadge) {
|
|
434
427
|
this.appIconBadge.style.backgroundColor = titleBackground;
|
|
435
428
|
}
|
|
436
|
-
if (titleBackground && ( Color.fromHex(titleBackground)).isLighter()) {
|
|
429
|
+
if (titleBackground && ( (Color.fromHex(titleBackground))).isLighter()) {
|
|
437
430
|
this.element.classList.add('light');
|
|
438
431
|
}
|
|
439
432
|
else {
|
|
@@ -446,7 +439,7 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
446
439
|
}
|
|
447
440
|
}
|
|
448
441
|
onContextMenu(e, menuId) {
|
|
449
|
-
const event = ( new StandardMouseEvent(getWindow(this.element), e));
|
|
442
|
+
const event = ( (new StandardMouseEvent(getWindow(this.element), e)));
|
|
450
443
|
this.contextMenuService.showContextMenu({
|
|
451
444
|
getAnchor: () => event,
|
|
452
445
|
menuId,
|
|
@@ -484,17 +477,17 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
484
477
|
return getZoomFactor(getWindow(this.element)) < 1 || !this.hasZoomableElements;
|
|
485
478
|
}
|
|
486
479
|
layout(width, height) {
|
|
487
|
-
this.updateLayout(( new Dimension(width, height)));
|
|
480
|
+
this.updateLayout(( (new Dimension(width, height))));
|
|
488
481
|
super.layoutContents(width, height);
|
|
489
482
|
}
|
|
490
483
|
updateLayout(dimension) {
|
|
491
484
|
this.lastLayoutDimensions = dimension;
|
|
492
485
|
{
|
|
493
486
|
const zoomFactor = getZoomFactor(getWindow(this.element));
|
|
494
|
-
this.element.style.setProperty('--zoom-factor', ( zoomFactor.toString()));
|
|
487
|
+
this.element.style.setProperty('--zoom-factor', ( (zoomFactor.toString())));
|
|
495
488
|
this.rootContainer.classList.toggle('counter-zoom', this.preventZoom);
|
|
496
489
|
if (this.customMenubar) {
|
|
497
|
-
const menubarDimension = ( new Dimension(0, dimension.height));
|
|
490
|
+
const menubarDimension = ( (new Dimension(0, dimension.height)));
|
|
498
491
|
this.customMenubar.layout(menubarDimension);
|
|
499
492
|
}
|
|
500
493
|
}
|
|
@@ -517,41 +510,41 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
517
510
|
super.dispose();
|
|
518
511
|
}
|
|
519
512
|
};
|
|
520
|
-
BrowserTitlebarPart = ( __decorate([
|
|
521
|
-
( __param(3, IContextMenuService)),
|
|
522
|
-
( __param(4, IConfigurationService)),
|
|
523
|
-
( __param(5, IBrowserWorkbenchEnvironmentService)),
|
|
524
|
-
( __param(6, IInstantiationService)),
|
|
525
|
-
( __param(7, IThemeService)),
|
|
526
|
-
( __param(8, IStorageService)),
|
|
527
|
-
( __param(9, IWorkbenchLayoutService)),
|
|
528
|
-
( __param(10, IContextKeyService)),
|
|
529
|
-
( __param(11, IHostService)),
|
|
530
|
-
( __param(12, IEditorGroupsService)),
|
|
531
|
-
( __param(13, IEditorService)),
|
|
532
|
-
( __param(14, IMenuService)),
|
|
533
|
-
( __param(15, IKeybindingService))
|
|
534
|
-
], BrowserTitlebarPart));
|
|
513
|
+
BrowserTitlebarPart = ( (__decorate([
|
|
514
|
+
( (__param(3, IContextMenuService))),
|
|
515
|
+
( (__param(4, IConfigurationService))),
|
|
516
|
+
( (__param(5, IBrowserWorkbenchEnvironmentService))),
|
|
517
|
+
( (__param(6, IInstantiationService))),
|
|
518
|
+
( (__param(7, IThemeService))),
|
|
519
|
+
( (__param(8, IStorageService))),
|
|
520
|
+
( (__param(9, IWorkbenchLayoutService))),
|
|
521
|
+
( (__param(10, IContextKeyService))),
|
|
522
|
+
( (__param(11, IHostService))),
|
|
523
|
+
( (__param(12, IEditorGroupsService))),
|
|
524
|
+
( (__param(13, IEditorService))),
|
|
525
|
+
( (__param(14, IMenuService))),
|
|
526
|
+
( (__param(15, IKeybindingService)))
|
|
527
|
+
], BrowserTitlebarPart)));
|
|
535
528
|
let MainBrowserTitlebarPart = class MainBrowserTitlebarPart extends BrowserTitlebarPart {
|
|
536
529
|
constructor(contextMenuService, configurationService, environmentService, instantiationService, themeService, storageService, layoutService, contextKeyService, hostService, editorGroupService, editorService, menuService, keybindingService) {
|
|
537
530
|
super("workbench.parts.titlebar" , mainWindow, 'main', contextMenuService, configurationService, environmentService, instantiationService, themeService, storageService, layoutService, contextKeyService, hostService, editorGroupService, editorService, menuService, keybindingService);
|
|
538
531
|
}
|
|
539
532
|
};
|
|
540
|
-
MainBrowserTitlebarPart = ( __decorate([
|
|
541
|
-
( __param(0, IContextMenuService)),
|
|
542
|
-
( __param(1, IConfigurationService)),
|
|
543
|
-
( __param(2, IBrowserWorkbenchEnvironmentService)),
|
|
544
|
-
( __param(3, IInstantiationService)),
|
|
545
|
-
( __param(4, IThemeService)),
|
|
546
|
-
( __param(5, IStorageService)),
|
|
547
|
-
( __param(6, IWorkbenchLayoutService)),
|
|
548
|
-
( __param(7, IContextKeyService)),
|
|
549
|
-
( __param(8, IHostService)),
|
|
550
|
-
( __param(9, IEditorGroupsService)),
|
|
551
|
-
( __param(10, IEditorService)),
|
|
552
|
-
( __param(11, IMenuService)),
|
|
553
|
-
( __param(12, IKeybindingService))
|
|
554
|
-
], MainBrowserTitlebarPart));
|
|
533
|
+
MainBrowserTitlebarPart = ( (__decorate([
|
|
534
|
+
( (__param(0, IContextMenuService))),
|
|
535
|
+
( (__param(1, IConfigurationService))),
|
|
536
|
+
( (__param(2, IBrowserWorkbenchEnvironmentService))),
|
|
537
|
+
( (__param(3, IInstantiationService))),
|
|
538
|
+
( (__param(4, IThemeService))),
|
|
539
|
+
( (__param(5, IStorageService))),
|
|
540
|
+
( (__param(6, IWorkbenchLayoutService))),
|
|
541
|
+
( (__param(7, IContextKeyService))),
|
|
542
|
+
( (__param(8, IHostService))),
|
|
543
|
+
( (__param(9, IEditorGroupsService))),
|
|
544
|
+
( (__param(10, IEditorService))),
|
|
545
|
+
( (__param(11, IMenuService))),
|
|
546
|
+
( (__param(12, IKeybindingService)))
|
|
547
|
+
], MainBrowserTitlebarPart)));
|
|
555
548
|
let AuxiliaryBrowserTitlebarPart = class AuxiliaryBrowserTitlebarPart extends BrowserTitlebarPart {
|
|
556
549
|
static { AuxiliaryBrowserTitlebarPart_1 = this; }
|
|
557
550
|
static { this.COUNTER = 1; }
|
|
@@ -566,20 +559,20 @@ let AuxiliaryBrowserTitlebarPart = class AuxiliaryBrowserTitlebarPart extends Br
|
|
|
566
559
|
return getZoomFactor(getWindow(this.element)) < 1 || !this.mainTitlebar.hasZoomableElements;
|
|
567
560
|
}
|
|
568
561
|
};
|
|
569
|
-
AuxiliaryBrowserTitlebarPart = AuxiliaryBrowserTitlebarPart_1 = ( __decorate([
|
|
570
|
-
( __param(3, IContextMenuService)),
|
|
571
|
-
( __param(4, IConfigurationService)),
|
|
572
|
-
( __param(5, IBrowserWorkbenchEnvironmentService)),
|
|
573
|
-
( __param(6, IInstantiationService)),
|
|
574
|
-
( __param(7, IThemeService)),
|
|
575
|
-
( __param(8, IStorageService)),
|
|
576
|
-
( __param(9, IWorkbenchLayoutService)),
|
|
577
|
-
( __param(10, IContextKeyService)),
|
|
578
|
-
( __param(11, IHostService)),
|
|
579
|
-
( __param(12, IEditorGroupsService)),
|
|
580
|
-
( __param(13, IEditorService)),
|
|
581
|
-
( __param(14, IMenuService)),
|
|
582
|
-
( __param(15, IKeybindingService))
|
|
583
|
-
], AuxiliaryBrowserTitlebarPart));
|
|
562
|
+
AuxiliaryBrowserTitlebarPart = AuxiliaryBrowserTitlebarPart_1 = ( (__decorate([
|
|
563
|
+
( (__param(3, IContextMenuService))),
|
|
564
|
+
( (__param(4, IConfigurationService))),
|
|
565
|
+
( (__param(5, IBrowserWorkbenchEnvironmentService))),
|
|
566
|
+
( (__param(6, IInstantiationService))),
|
|
567
|
+
( (__param(7, IThemeService))),
|
|
568
|
+
( (__param(8, IStorageService))),
|
|
569
|
+
( (__param(9, IWorkbenchLayoutService))),
|
|
570
|
+
( (__param(10, IContextKeyService))),
|
|
571
|
+
( (__param(11, IHostService))),
|
|
572
|
+
( (__param(12, IEditorGroupsService))),
|
|
573
|
+
( (__param(13, IEditorService))),
|
|
574
|
+
( (__param(14, IMenuService))),
|
|
575
|
+
( (__param(15, IKeybindingService)))
|
|
576
|
+
], AuxiliaryBrowserTitlebarPart)));
|
|
584
577
|
|
|
585
578
|
export { AuxiliaryBrowserTitlebarPart, BrowserTitleService, BrowserTitlebarPart, MainBrowserTitlebarPart };
|