@codingame/monaco-vscode-view-title-bar-service-override 1.82.6 → 1.83.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 +4 -4
- package/vscode/src/vs/workbench/browser/parts/titlebar/commandCenterControl.js +123 -76
- package/vscode/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.d.ts +0 -1
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.js +4 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-view-title-bar-service-override",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.83.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
},
|
|
14
14
|
"type": "module",
|
|
15
15
|
"private": false,
|
|
16
|
-
"description": "VSCode public API plugged on the monaco editor - view-title-bar service-override
|
|
16
|
+
"description": "VSCode public API plugged on the monaco editor - view-title-bar service-override",
|
|
17
17
|
"main": "index.js",
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.
|
|
22
|
-
"monaco-editor": "0.
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.83.1",
|
|
22
|
+
"monaco-editor": "0.44.0"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -3,22 +3,21 @@ import { reset } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
|
3
3
|
import { BaseActionViewItem } from 'monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js';
|
|
4
4
|
import { setupCustomHover } from 'monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabelHover.js';
|
|
5
5
|
import { renderIcon } from 'monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js';
|
|
6
|
+
import { SubmenuAction } from 'monaco-editor/esm/vs/base/common/actions.js';
|
|
6
7
|
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
7
|
-
import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
|
|
8
8
|
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
9
9
|
import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
10
10
|
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
11
11
|
import { createActionViewItem } from 'monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js';
|
|
12
|
-
import { MenuWorkbenchToolBar } from 'monaco-editor/esm/vs/platform/actions/browser/toolbar.js';
|
|
13
|
-
import { MenuId,
|
|
12
|
+
import { WorkbenchToolBar, MenuWorkbenchToolBar } from 'monaco-editor/esm/vs/platform/actions/browser/toolbar.js';
|
|
13
|
+
import { MenuRegistry, MenuId, SubmenuItemAction } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
14
14
|
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
15
15
|
import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
|
|
16
16
|
import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
|
|
17
|
-
import * as colors from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
18
|
-
import { TITLE_BAR_ACTIVE_FOREGROUND, MENUBAR_SELECTION_FOREGROUND, TITLE_BAR_INACTIVE_FOREGROUND, MENUBAR_SELECTION_BACKGROUND } from 'vscode/vscode/vs/workbench/common/theme';
|
|
19
17
|
|
|
18
|
+
var CommandCenterCenterViewItem_1;
|
|
20
19
|
let CommandCenterControl = class CommandCenterControl {
|
|
21
|
-
constructor(windowTitle, hoverDelegate, instantiationService, quickInputService
|
|
20
|
+
constructor(windowTitle, hoverDelegate, instantiationService, quickInputService) {
|
|
22
21
|
this._disposables = ( new DisposableStore());
|
|
23
22
|
this._onDidChangeVisibility = ( new Emitter());
|
|
24
23
|
this.onDidChangeVisibility = this._onDidChangeVisibility.event;
|
|
@@ -26,36 +25,106 @@ let CommandCenterControl = class CommandCenterControl {
|
|
|
26
25
|
this.element.classList.add('command-center');
|
|
27
26
|
const titleToolbar = instantiationService.createInstance(MenuWorkbenchToolBar, this.element, MenuId.CommandCenter, {
|
|
28
27
|
contextMenu: MenuId.TitleBarContext,
|
|
29
|
-
hiddenItemStrategy:
|
|
28
|
+
hiddenItemStrategy: -1 ,
|
|
30
29
|
toolbarOptions: {
|
|
31
30
|
primaryGroup: () => true,
|
|
32
31
|
},
|
|
33
32
|
telemetrySource: 'commandCenter',
|
|
34
33
|
actionViewItemProvider: (action) => {
|
|
35
|
-
if (action instanceof
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
if (action instanceof SubmenuItemAction && action.item.submenu === MenuId.CommandCenterCenter) {
|
|
35
|
+
return instantiationService.createInstance(CommandCenterCenterViewItem, action, windowTitle, hoverDelegate, {});
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return createActionViewItem(instantiationService, action, { hoverDelegate });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
this._disposables.add(quickInputService.onShow(this._setVisibility.bind(this, false)));
|
|
43
|
+
this._disposables.add(quickInputService.onHide(this._setVisibility.bind(this, true)));
|
|
44
|
+
this._disposables.add(titleToolbar);
|
|
45
|
+
}
|
|
46
|
+
_setVisibility(show) {
|
|
47
|
+
this.element.classList.toggle('hide', !show);
|
|
48
|
+
this._onDidChangeVisibility.fire();
|
|
49
|
+
}
|
|
50
|
+
dispose() {
|
|
51
|
+
this._disposables.dispose();
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
CommandCenterControl = ( __decorate([
|
|
55
|
+
( __param(2, IInstantiationService)),
|
|
56
|
+
( __param(3, IQuickInputService))
|
|
57
|
+
], CommandCenterControl));
|
|
58
|
+
let CommandCenterCenterViewItem = class CommandCenterCenterViewItem extends BaseActionViewItem {
|
|
59
|
+
static { CommandCenterCenterViewItem_1 = this; }
|
|
60
|
+
static { this._quickOpenCommandId = 'workbench.action.quickOpenWithModes'; }
|
|
61
|
+
constructor(_submenu, _windowTitle, _hoverDelegate, options, _keybindingService, _instaService) {
|
|
62
|
+
super(undefined, _submenu.actions.find(action => action.id === 'workbench.action.quickOpenWithModes') ?? _submenu.actions[0], options);
|
|
63
|
+
this._submenu = _submenu;
|
|
64
|
+
this._windowTitle = _windowTitle;
|
|
65
|
+
this._hoverDelegate = _hoverDelegate;
|
|
66
|
+
this._keybindingService = _keybindingService;
|
|
67
|
+
this._instaService = _instaService;
|
|
68
|
+
}
|
|
69
|
+
render(container) {
|
|
70
|
+
super.render(container);
|
|
71
|
+
container.classList.add('command-center-center');
|
|
72
|
+
container.classList.toggle('multiple', (this._submenu.actions.length > 1));
|
|
73
|
+
const hover = this._store.add(setupCustomHover(this._hoverDelegate, container, this.getTooltip()));
|
|
74
|
+
this._store.add(this._windowTitle.onDidChange(() => {
|
|
75
|
+
hover.update(this.getTooltip());
|
|
76
|
+
}));
|
|
77
|
+
const groups = [];
|
|
78
|
+
for (const action of this._submenu.actions) {
|
|
79
|
+
if (action instanceof SubmenuAction) {
|
|
80
|
+
groups.push(action.actions);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
groups.push([action]);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
for (let i = 0; i < groups.length; i++) {
|
|
87
|
+
const group = groups[i];
|
|
88
|
+
const toolbar = this._instaService.createInstance(WorkbenchToolBar, container, {
|
|
89
|
+
hiddenItemStrategy: -1 ,
|
|
90
|
+
telemetrySource: 'commandCenterCenter',
|
|
91
|
+
actionViewItemProvider: (action, options) => {
|
|
92
|
+
options = {
|
|
93
|
+
...options,
|
|
94
|
+
hoverDelegate: this._hoverDelegate,
|
|
95
|
+
};
|
|
96
|
+
if (action.id !== CommandCenterCenterViewItem_1._quickOpenCommandId) {
|
|
97
|
+
return createActionViewItem(this._instaService, action, options);
|
|
98
|
+
}
|
|
99
|
+
const that = this;
|
|
100
|
+
return this._instaService.createInstance(class CommandCenterQuickPickItem extends BaseActionViewItem {
|
|
101
|
+
constructor() {
|
|
38
102
|
super(undefined, action, options);
|
|
39
103
|
}
|
|
40
104
|
render(container) {
|
|
41
105
|
super.render(container);
|
|
42
|
-
container.classList.
|
|
43
|
-
const
|
|
106
|
+
container.classList.toggle('command-center-quick-pick');
|
|
107
|
+
const action = this.action;
|
|
108
|
+
const searchIcon = document.createElement('span');
|
|
109
|
+
searchIcon.className = action.class ?? '';
|
|
44
110
|
searchIcon.classList.add('search-icon');
|
|
45
111
|
const label = this._getLabel();
|
|
46
112
|
const labelElement = document.createElement('span');
|
|
47
113
|
labelElement.classList.add('search-label');
|
|
48
114
|
labelElement.innerText = label;
|
|
49
115
|
reset(container, searchIcon, labelElement);
|
|
50
|
-
const hover = this._store.add(setupCustomHover(
|
|
51
|
-
this._store.add(
|
|
116
|
+
const hover = this._store.add(setupCustomHover(that._hoverDelegate, container, this.getTooltip()));
|
|
117
|
+
this._store.add(that._windowTitle.onDidChange(() => {
|
|
52
118
|
hover.update(this.getTooltip());
|
|
53
119
|
labelElement.innerText = this._getLabel();
|
|
54
120
|
}));
|
|
55
121
|
}
|
|
122
|
+
getTooltip() {
|
|
123
|
+
return that.getTooltip();
|
|
124
|
+
}
|
|
56
125
|
_getLabel() {
|
|
57
|
-
const { prefix, suffix } =
|
|
58
|
-
let label =
|
|
126
|
+
const { prefix, suffix } = that._windowTitle.getTitleDecorations();
|
|
127
|
+
let label = that._windowTitle.isCustomTitleFormat() ? that._windowTitle.getWindowTitle() : that._windowTitle.workspaceName;
|
|
59
128
|
if (!label) {
|
|
60
129
|
label = ( localize('label.dfl', "Search"));
|
|
61
130
|
}
|
|
@@ -67,70 +136,48 @@ let CommandCenterControl = class CommandCenterControl {
|
|
|
67
136
|
}
|
|
68
137
|
return label;
|
|
69
138
|
}
|
|
70
|
-
|
|
71
|
-
const kb = keybindingService.lookupKeybinding(action.id)?.getLabel();
|
|
72
|
-
const title = kb
|
|
73
|
-
? ( localize(
|
|
74
|
-
'title',
|
|
75
|
-
"Search {0} ({1}) \u2014 {2}",
|
|
76
|
-
windowTitle.workspaceName,
|
|
77
|
-
kb,
|
|
78
|
-
windowTitle.value
|
|
79
|
-
))
|
|
80
|
-
: ( localize(
|
|
81
|
-
'title2',
|
|
82
|
-
"Search {0} \u2014 {1}",
|
|
83
|
-
windowTitle.workspaceName,
|
|
84
|
-
windowTitle.value
|
|
85
|
-
));
|
|
86
|
-
return title;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return instantiationService.createInstance(CommandCenterViewItem, action, {});
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
return createActionViewItem(instantiationService, action, { hoverDelegate });
|
|
139
|
+
});
|
|
93
140
|
}
|
|
141
|
+
});
|
|
142
|
+
toolbar.setActions(group);
|
|
143
|
+
this._store.add(toolbar);
|
|
144
|
+
if (i < groups.length - 1) {
|
|
145
|
+
const icon = renderIcon(Codicon.circleSmallFilled);
|
|
146
|
+
icon.style.padding = '0 12px';
|
|
147
|
+
icon.style.height = '100%';
|
|
148
|
+
icon.style.opacity = '0.5';
|
|
149
|
+
container.appendChild(icon);
|
|
94
150
|
}
|
|
95
|
-
}
|
|
96
|
-
this._disposables.add(quickInputService.onShow(this._setVisibility.bind(this, false)));
|
|
97
|
-
this._disposables.add(quickInputService.onHide(this._setVisibility.bind(this, true)));
|
|
98
|
-
this._disposables.add(titleToolbar);
|
|
151
|
+
}
|
|
99
152
|
}
|
|
100
|
-
|
|
101
|
-
this.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
153
|
+
getTooltip() {
|
|
154
|
+
const kb = this._keybindingService.lookupKeybinding(this.action.id)?.getLabel();
|
|
155
|
+
const title = kb
|
|
156
|
+
? ( localize(
|
|
157
|
+
'title',
|
|
158
|
+
"Search {0} ({1}) \u2014 {2}",
|
|
159
|
+
this._windowTitle.workspaceName,
|
|
160
|
+
kb,
|
|
161
|
+
this._windowTitle.value
|
|
162
|
+
))
|
|
163
|
+
: ( localize(
|
|
164
|
+
'title2',
|
|
165
|
+
"Search {0} \u2014 {1}",
|
|
166
|
+
this._windowTitle.workspaceName,
|
|
167
|
+
this._windowTitle.value
|
|
168
|
+
));
|
|
169
|
+
return title;
|
|
106
170
|
}
|
|
107
171
|
};
|
|
108
|
-
|
|
109
|
-
( __param(
|
|
110
|
-
( __param(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
)
|
|
118
|
-
colors.registerColor('commandCenter.inactiveForeground', { dark: TITLE_BAR_INACTIVE_FOREGROUND, hcDark: TITLE_BAR_INACTIVE_FOREGROUND, light: TITLE_BAR_INACTIVE_FOREGROUND, hcLight: TITLE_BAR_INACTIVE_FOREGROUND }, ( localize(
|
|
119
|
-
'commandCenter-inactiveForeground',
|
|
120
|
-
"Foreground color of the command center when the window is inactive"
|
|
121
|
-
)), false);
|
|
122
|
-
colors.registerColor('commandCenter.background', {
|
|
123
|
-
dark: ( Color.white.transparent(0.05)), hcDark: null, light: ( Color.black.transparent(0.05)), hcLight: null
|
|
124
|
-
}, ( localize('commandCenter-background', "Background color of the command center")), false);
|
|
125
|
-
colors.registerColor('commandCenter.activeBackground', { dark: ( Color.white.transparent(0.08)), hcDark: MENUBAR_SELECTION_BACKGROUND, light: ( Color.black.transparent(0.08)), hcLight: MENUBAR_SELECTION_BACKGROUND }, ( localize(
|
|
126
|
-
'commandCenter-activeBackground',
|
|
127
|
-
"Active background color of the command center"
|
|
128
|
-
)), false);
|
|
129
|
-
colors.registerColor('commandCenter.border', { dark: ( colors.transparent(TITLE_BAR_ACTIVE_FOREGROUND, .20)), hcDark: ( colors.transparent(TITLE_BAR_ACTIVE_FOREGROUND, .60)), light: ( colors.transparent(TITLE_BAR_ACTIVE_FOREGROUND, .20)), hcLight: ( colors.transparent(TITLE_BAR_ACTIVE_FOREGROUND, .60)) }, ( localize('commandCenter-border', "Border color of the command center")), false);
|
|
130
|
-
colors.registerColor('commandCenter.activeBorder', { dark: ( colors.transparent(TITLE_BAR_ACTIVE_FOREGROUND, .30)), hcDark: TITLE_BAR_ACTIVE_FOREGROUND, light: ( colors.transparent(TITLE_BAR_ACTIVE_FOREGROUND, .30)), hcLight: TITLE_BAR_ACTIVE_FOREGROUND }, ( localize('commandCenter-activeBorder', "Active border color of the command center")), false);
|
|
131
|
-
colors.registerColor('commandCenter.inactiveBorder', { dark: ( colors.transparent(TITLE_BAR_INACTIVE_FOREGROUND, .25)), hcDark: ( colors.transparent(TITLE_BAR_INACTIVE_FOREGROUND, .25)), light: ( colors.transparent(TITLE_BAR_INACTIVE_FOREGROUND, .25)), hcLight: ( colors.transparent(TITLE_BAR_INACTIVE_FOREGROUND, .25)) }, ( localize(
|
|
132
|
-
'commandCenter-inactiveBorder',
|
|
133
|
-
"Border color of the command center when the window is inactive"
|
|
134
|
-
)), false);
|
|
172
|
+
CommandCenterCenterViewItem = CommandCenterCenterViewItem_1 = ( __decorate([
|
|
173
|
+
( __param(4, IKeybindingService)),
|
|
174
|
+
( __param(5, IInstantiationService))
|
|
175
|
+
], CommandCenterCenterViewItem));
|
|
176
|
+
MenuRegistry.appendMenuItem(MenuId.CommandCenter, {
|
|
177
|
+
submenu: MenuId.CommandCenterCenter,
|
|
178
|
+
title: ( localize('title3', "Command Center")),
|
|
179
|
+
icon: Codicon.shield,
|
|
180
|
+
order: 101,
|
|
181
|
+
});
|
|
135
182
|
|
|
136
183
|
export { CommandCenterControl };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
2
|
|
|
3
|
-
var css = ".monaco-workbench .part.titlebar{display:flex;flex-direction:row}.monaco-workbench.mac .part.titlebar{flex-direction:row-reverse}.monaco-workbench .part.titlebar>.titlebar-container{align-items:center;box-sizing:border-box;display:flex;flex-grow:1;flex-shrink:1;height:100%;justify-content:space-between;overflow:hidden;user-select:none;-webkit-user-select:none;width:100%}.monaco-workbench .part.titlebar>.titlebar-container.counter-zoom{zoom:calc(1/var(--zoom-factor))}.monaco-workbench.mac .part.titlebar>.titlebar-container{line-height:22px}.monaco-workbench.linux .part.titlebar>.titlebar-container,.monaco-workbench.web .part.titlebar>.titlebar-container,.monaco-workbench.windows .part.titlebar>.titlebar-container{justify-content:left;line-height:22px}.monaco-workbench.web.safari .part.titlebar,.monaco-workbench.web.safari .part.titlebar>.titlebar-container{overflow:visible}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-drag-region{-webkit-app-region:drag;display:block;height:100%;left:0;position:absolute;top:0;width:100%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center,.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left,.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right{align-items:center;display:flex;height:100%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left{flex-grow:2;justify-content:flex-start;order:0;width:20%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center{justify-content:center;margin:0 10px;max-width:fit-content;min-width:0;order:1;width:60%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right{flex-grow:2;justify-content:flex-end;min-width:min-content;order:2;width:20%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title{flex:0 1 auto;font-size:12px;margin-left:auto;margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-workbench.linux .part.titlebar>.titlebar-container>.titlebar-center>.window-title,.monaco-workbench.web .part.titlebar>.titlebar-container>.titlebar-center>.window-title,.monaco-workbench.windows .part.titlebar>.titlebar-container>.titlebar-center>.window-title{cursor:default}.monaco-workbench.linux .part.titlebar>.titlebar-container>.titlebar-center>.window-title{font-size:inherit}.monaco-workbench .part.titlebar>.titlebar-container .monaco-toolbar .actions-container{gap:4px}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center{-webkit-app-region:no-drag;z-index:2500}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center.hide{visibility:hidden}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item>.action-label{color:var(--vscode-titleBar-activeForeground)}.monaco-workbench .part.titlebar.inactive>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item>.action-label{color:var(--vscode-titleBar-inactiveForeground)}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .codicon{color:inherit}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center{align-items:stretch;background-color:var(--vscode-commandCenter-background);border:1px solid var(--vscode-commandCenter-border);border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top-left-radius:6px;border-top-right-radius:6px;color:var(--vscode-commandCenter-foreground);display:flex;height:22px;margin-left:6px;max-width:600px;overflow:hidden;width:38vw}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center:only-child{margin-left:0}.monaco-workbench .part.titlebar.inactive>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center{border-color:var(--vscode-commandCenter-inactiveBorder)!important;color:var(--vscode-titleBar-inactiveForeground)}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center .search-icon{font-size:14px;margin:auto 3px;opacity:.8}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center .search-label{overflow:hidden;text-overflow:ellipsis}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center:HOVER{background-color:var(--vscode-commandCenter-activeBackground);border-color:var(--vscode-commandCenter-activeBorder);color:var(--vscode-commandCenter-activeForeground)}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left>.menubar{flex-wrap:nowrap;min-width:36px;order:2;z-index:2500}.monaco-workbench.web .part.titlebar>.titlebar-container>.titlebar-left>.menubar{margin-left:4px}.monaco-workbench .part.titlebar>.titlebar-container.counter-zoom .menubar .menubar-menu-button>.menubar-menu-items-holder.monaco-menu-container{zoom:var(--zoom-factor)}.monaco-workbench.linux .part.titlebar>.titlebar-container>.resizer,.monaco-workbench.windows .part.titlebar>.titlebar-container>.resizer{-webkit-app-region:no-drag;height:4px;position:absolute;top:0;width:100%}.monaco-workbench.linux.fullscreen .part.titlebar>.titlebar-container>.resizer,.monaco-workbench.windows.fullscreen .part.titlebar>.titlebar-container>.resizer{display:none}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left>.window-appicon{flex-shrink:0;height:100%;order:1;position:relative;width:35px;z-index:2500}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left>.window-appicon:not(.codicon){background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGQ9Ik0xMDI0IDEwMjRIMFYwaDEwMjR2MTAyNHoiIHN0eWxlPSJmaWxsOiNmNmY2ZjY7ZmlsbC1vcGFjaXR5OjAiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTAyNCA4NS4zMzN2ODUzLjMzM0gwVjg1LjMzM2gxMDI0eiIgc3R5bGU9ImZpbGw6I2ZmZiIvPjxwYXRoIGQ9Ik0wIDg1LjMzM2gyOTguNjY3djg1My4zMzNIMFY4NS4zMzN6bTEwMjQgMHY4NTMuMzMzSDM4NFY4NS4zMzNoNjQwem0tNTU0LjY2NyAxNjBoMzQxLjMzM3YtNjRINDY5LjMzM3Y2NHptMzQxLjMzNCA1MzMuMzM0SDQ2OS4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0xMjgtMTQ5LjMzNEg1OTcuMzMzdjY0aDM0MS4zMzNsLjAwMS02NHptMC0xNDkuMzMzSDU5Ny4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0wLTE0OS4zMzNINTk3LjMzM3Y2NGgzNDEuMzMzbC4wMDEtNjR6IiBzdHlsZT0iZmlsbDojMTY3YWJmIi8+PC9zdmc+\");background-position:50%;background-repeat:no-repeat;background-size:16px}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left>.window-appicon.codicon{line-height:30px}.monaco-workbench.fullscreen .part.titlebar>.titlebar-container>.titlebar-left>.window-appicon{display:none}.monaco-workbench .part.titlebar>.titlebar-container .window-appicon>.home-bar-icon-badge{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGQ9Ik0xMDI0IDEwMjRIMFYwaDEwMjR2MTAyNHoiIHN0eWxlPSJmaWxsOiNmNmY2ZjY7ZmlsbC1vcGFjaXR5OjAiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTAyNCA4NS4zMzN2ODUzLjMzM0gwVjg1LjMzM2gxMDI0eiIgc3R5bGU9ImZpbGw6I2ZmZiIvPjxwYXRoIGQ9Ik0wIDg1LjMzM2gyOTguNjY3djg1My4zMzNIMFY4NS4zMzN6bTEwMjQgMHY4NTMuMzMzSDM4NFY4NS4zMzNoNjQwem0tNTU0LjY2NyAxNjBoMzQxLjMzM3YtNjRINDY5LjMzM3Y2NHptMzQxLjMzNCA1MzMuMzM0SDQ2OS4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0xMjgtMTQ5LjMzNEg1OTcuMzMzdjY0aDM0MS4zMzNsLjAwMS02NHptMC0xNDkuMzMzSDU5Ny4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0wLTE0OS4zMzNINTk3LjMzM3Y2NGgzNDEuMzMzbC4wMDEtNjR6IiBzdHlsZT0iZmlsbDojMTY3YWJmIi8+PC9zdmc+\");background-position:50%;background-repeat:no-repeat;background-size:8px;border-left:1px solid transparent;border-top:1px solid transparent;bottom:6px;height:8px;pointer-events:none;position:absolute;right:9px;width:8px;z-index:1}.monaco-workbench .part.titlebar .window-controls-container{-webkit-app-region:no-drag;display:flex;flex-grow:0;flex-shrink:0;height:100%;text-align:center;width:0;z-index:3000}.monaco-workbench.web .part.titlebar .titlebar-right .window-controls-container{height:env(titlebar-area-height,35px);width:calc(100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px))}.monaco-workbench.web .part.titlebar .titlebar-left .window-controls-container{height:env(titlebar-area-height,35px);width:env(titlebar-area-x,0)}.monaco-workbench.web.mac .part.titlebar .titlebar-left .window-controls-container{order:0}.monaco-workbench.web.mac .part.titlebar .titlebar-right .window-controls-container{order:1}.monaco-workbench:not(.web):not(.mac) .part.titlebar .window-controls-container.primary{width:calc(138px/var(--zoom-factor, 1))}.monaco-workbench:not(.web):not(.mac) .part.titlebar .titlebar-container.counter-zoom .window-controls-container.primary{width:138px}.monaco-workbench:not(.web):not(.mac) .part.titlebar .titlebar-container:not(.counter-zoom) .window-controls-container *{zoom:calc(1/var(--zoom-factor, 1))}.monaco-workbench:not(.web).mac .part.titlebar .window-controls-container.primary{width:70px}.monaco-workbench.fullscreen .part.titlebar .window-controls-container{background-color:transparent;display:none}.monaco-workbench .part.titlebar .window-controls-container>.window-icon{align-items:center;display:flex;font-size:16px;height:100%;justify-content:center;width:46px}.monaco-workbench .part.titlebar .window-controls-container>.window-icon:before{height:16px;line-height:16px}.monaco-workbench .part.titlebar .window-controls-container>.window-icon:hover{background-color:hsla(0,0%,100%,.1)}.monaco-workbench .part.titlebar.light>.window-controls-container>.window-icon:hover{background-color:rgba(0,0,0,.1)}.monaco-workbench .part.titlebar .window-controls-container>.window-icon.window-close:hover{background-color:rgba(232,17,35,.9)}.monaco-workbench .part.titlebar .window-controls-container .window-icon.window-close:hover{color:#fff}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right>.layout-controls-container{-webkit-app-region:no-drag;display:none;flex-grow:0;flex-shrink:0;height:100%;margin-left:auto;min-width:28px;padding-right:2px;position:relative;text-align:center;z-index:2500}.monaco-workbench.mac:not(.web) .part.titlebar>.titlebar-container>.titlebar-right>.layout-controls-container{right:8px}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right>.layout-controls-container.show-layout-control{display:flex;justify-content:center}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right>.layout-controls-container .codicon{color:inherit}.monaco-workbench .part.titlebar .window-controls-container .window-icon{color:var(--vscode-titleBar-activeForeground)}.monaco-workbench .part.titlebar.inactive .window-controls-container .window-icon{color:var(--vscode-titleBar-inactiveForeground)}";
|
|
3
|
+
var css = ".monaco-workbench .part.titlebar{display:flex;flex-direction:row}.monaco-workbench.mac .part.titlebar{flex-direction:row-reverse}.monaco-workbench .part.titlebar>.titlebar-container{align-items:center;box-sizing:border-box;display:flex;flex-grow:1;flex-shrink:1;height:100%;justify-content:space-between;overflow:hidden;user-select:none;-webkit-user-select:none;width:100%}.monaco-workbench .part.titlebar>.titlebar-container.counter-zoom{zoom:calc(1/var(--zoom-factor))}.monaco-workbench.mac .part.titlebar>.titlebar-container{line-height:22px}.monaco-workbench.linux .part.titlebar>.titlebar-container,.monaco-workbench.web .part.titlebar>.titlebar-container,.monaco-workbench.windows .part.titlebar>.titlebar-container{justify-content:left;line-height:22px}.monaco-workbench.web.safari .part.titlebar,.monaco-workbench.web.safari .part.titlebar>.titlebar-container{overflow:visible}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-drag-region{-webkit-app-region:drag;display:block;height:100%;left:0;position:absolute;top:0;width:100%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center,.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left,.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right{align-items:center;display:flex;height:100%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left{flex-grow:2;justify-content:flex-start;order:0;width:20%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center{justify-content:center;margin:0 10px;max-width:fit-content;min-width:0;order:1;width:60%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right{flex-grow:2;justify-content:flex-end;min-width:min-content;order:2;width:20%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title{flex:0 1 auto;font-size:12px;margin-left:auto;margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-workbench.linux .part.titlebar>.titlebar-container>.titlebar-center>.window-title,.monaco-workbench.web .part.titlebar>.titlebar-container>.titlebar-center>.window-title,.monaco-workbench.windows .part.titlebar>.titlebar-container>.titlebar-center>.window-title{cursor:default}.monaco-workbench.linux .part.titlebar>.titlebar-container>.titlebar-center>.window-title{font-size:inherit}.monaco-workbench .part.titlebar>.titlebar-container .monaco-toolbar .actions-container{gap:4px}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center{-webkit-app-region:no-drag;z-index:2500}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center.hide{visibility:hidden}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.action-label{color:var(--vscode-titleBar-activeForeground)}.monaco-workbench .part.titlebar.inactive>.titlebar-container>.titlebar-center>.window-title>.command-center>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.action-label{color:var(--vscode-titleBar-inactiveForeground)}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.action-label{color:inherit}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center-center{align-items:stretch;background-color:var(--vscode-commandCenter-background);border:1px solid var(--vscode-commandCenter-border);border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top-left-radius:6px;border-top-right-radius:6px;color:var(--vscode-commandCenter-foreground);display:flex;height:22px;margin-left:6px;max-width:600px;overflow:hidden;width:38vw}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center-center .action-item.command-center-quick-pick{display:flex}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center-center .action-item.command-center-quick-pick .search-icon{font-size:14px;margin:auto 3px;opacity:.8}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center-center .action-item.command-center-quick-pick .search-label{overflow:hidden;text-overflow:ellipsis}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center-center.multiple{justify-content:flex-start;padding:0 12px}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center-center.multiple.active .action-label{background-color:inherit}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center-center:only-child{margin-left:0}.monaco-workbench .part.titlebar.inactive>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center-center{border-color:var(--vscode-commandCenter-inactiveBorder)!important;color:var(--vscode-titleBar-inactiveForeground)}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center-center:HOVER{background-color:var(--vscode-commandCenter-activeBackground);border-color:var(--vscode-commandCenter-activeBorder);color:var(--vscode-commandCenter-activeForeground)}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left>.menubar{flex-wrap:nowrap;min-width:36px;order:2;z-index:2500}.monaco-workbench.web .part.titlebar>.titlebar-container>.titlebar-left>.menubar{margin-left:4px}.monaco-workbench .part.titlebar>.titlebar-container.counter-zoom .menubar .menubar-menu-button>.menubar-menu-items-holder.monaco-menu-container{zoom:var(--zoom-factor)}.monaco-workbench.linux .part.titlebar>.titlebar-container>.resizer,.monaco-workbench.windows .part.titlebar>.titlebar-container>.resizer{-webkit-app-region:no-drag;height:4px;position:absolute;top:0;width:100%}.monaco-workbench.linux.fullscreen .part.titlebar>.titlebar-container>.resizer,.monaco-workbench.windows.fullscreen .part.titlebar>.titlebar-container>.resizer{display:none}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left>.window-appicon{flex-shrink:0;height:100%;order:1;position:relative;width:35px;z-index:2500}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left>.window-appicon:not(.codicon){background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGQ9Ik0xMDI0IDEwMjRIMFYwaDEwMjR2MTAyNHoiIHN0eWxlPSJmaWxsOiNmNmY2ZjY7ZmlsbC1vcGFjaXR5OjAiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTAyNCA4NS4zMzN2ODUzLjMzM0gwVjg1LjMzM2gxMDI0eiIgc3R5bGU9ImZpbGw6I2ZmZiIvPjxwYXRoIGQ9Ik0wIDg1LjMzM2gyOTguNjY3djg1My4zMzNIMFY4NS4zMzN6bTEwMjQgMHY4NTMuMzMzSDM4NFY4NS4zMzNoNjQwem0tNTU0LjY2NyAxNjBoMzQxLjMzM3YtNjRINDY5LjMzM3Y2NHptMzQxLjMzNCA1MzMuMzM0SDQ2OS4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0xMjgtMTQ5LjMzNEg1OTcuMzMzdjY0aDM0MS4zMzNsLjAwMS02NHptMC0xNDkuMzMzSDU5Ny4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0wLTE0OS4zMzNINTk3LjMzM3Y2NGgzNDEuMzMzbC4wMDEtNjR6IiBzdHlsZT0iZmlsbDojMTY3YWJmIi8+PC9zdmc+\");background-position:50%;background-repeat:no-repeat;background-size:16px}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left>.window-appicon.codicon{line-height:30px}.monaco-workbench.fullscreen .part.titlebar>.titlebar-container>.titlebar-left>.window-appicon{display:none}.monaco-workbench .part.titlebar>.titlebar-container .window-appicon>.home-bar-icon-badge{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGQ9Ik0xMDI0IDEwMjRIMFYwaDEwMjR2MTAyNHoiIHN0eWxlPSJmaWxsOiNmNmY2ZjY7ZmlsbC1vcGFjaXR5OjAiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTAyNCA4NS4zMzN2ODUzLjMzM0gwVjg1LjMzM2gxMDI0eiIgc3R5bGU9ImZpbGw6I2ZmZiIvPjxwYXRoIGQ9Ik0wIDg1LjMzM2gyOTguNjY3djg1My4zMzNIMFY4NS4zMzN6bTEwMjQgMHY4NTMuMzMzSDM4NFY4NS4zMzNoNjQwem0tNTU0LjY2NyAxNjBoMzQxLjMzM3YtNjRINDY5LjMzM3Y2NHptMzQxLjMzNCA1MzMuMzM0SDQ2OS4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0xMjgtMTQ5LjMzNEg1OTcuMzMzdjY0aDM0MS4zMzNsLjAwMS02NHptMC0xNDkuMzMzSDU5Ny4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0wLTE0OS4zMzNINTk3LjMzM3Y2NGgzNDEuMzMzbC4wMDEtNjR6IiBzdHlsZT0iZmlsbDojMTY3YWJmIi8+PC9zdmc+\");background-position:50%;background-repeat:no-repeat;background-size:8px;border-left:1px solid transparent;border-top:1px solid transparent;bottom:6px;height:8px;pointer-events:none;position:absolute;right:9px;width:8px;z-index:1}.monaco-workbench .part.titlebar .window-controls-container{-webkit-app-region:no-drag;display:flex;flex-grow:0;flex-shrink:0;height:100%;text-align:center;width:0;z-index:3000}.monaco-workbench.web .part.titlebar .titlebar-right .window-controls-container{height:env(titlebar-area-height,35px);width:calc(100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px))}.monaco-workbench.web .part.titlebar .titlebar-left .window-controls-container{height:env(titlebar-area-height,35px);width:env(titlebar-area-x,0)}.monaco-workbench.web.mac .part.titlebar .titlebar-left .window-controls-container{order:0}.monaco-workbench.web.mac .part.titlebar .titlebar-right .window-controls-container{order:1}.monaco-workbench:not(.web):not(.mac) .part.titlebar .window-controls-container.primary{width:calc(138px/var(--zoom-factor, 1))}.monaco-workbench:not(.web):not(.mac) .part.titlebar .titlebar-container.counter-zoom .window-controls-container.primary{width:138px}.monaco-workbench:not(.web):not(.mac) .part.titlebar .titlebar-container:not(.counter-zoom) .window-controls-container *{zoom:calc(1/var(--zoom-factor, 1))}.monaco-workbench:not(.web).mac .part.titlebar .window-controls-container.primary{width:70px}.monaco-workbench.fullscreen .part.titlebar .window-controls-container{background-color:transparent;display:none}.monaco-workbench .part.titlebar .window-controls-container>.window-icon{align-items:center;display:flex;font-size:16px;height:100%;justify-content:center;width:46px}.monaco-workbench .part.titlebar .window-controls-container>.window-icon:before{height:16px;line-height:16px}.monaco-workbench .part.titlebar .window-controls-container>.window-icon:hover{background-color:hsla(0,0%,100%,.1)}.monaco-workbench .part.titlebar.light>.window-controls-container>.window-icon:hover{background-color:rgba(0,0,0,.1)}.monaco-workbench .part.titlebar .window-controls-container>.window-icon.window-close:hover{background-color:rgba(232,17,35,.9)}.monaco-workbench .part.titlebar .window-controls-container .window-icon.window-close:hover{color:#fff}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right>.layout-controls-container{-webkit-app-region:no-drag;display:none;flex-grow:0;flex-shrink:0;height:100%;margin-left:auto;min-width:28px;padding-right:2px;position:relative;text-align:center;z-index:2500}.monaco-workbench.mac:not(.web) .part.titlebar>.titlebar-container>.titlebar-right>.layout-controls-container{right:8px}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right>.layout-controls-container.show-layout-control{display:flex;justify-content:center}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right>.layout-controls-container .codicon{color:inherit}.monaco-workbench .part.titlebar .window-controls-container .window-icon{color:var(--vscode-titleBar-activeForeground)}.monaco-workbench .part.titlebar.inactive .window-controls-container .window-icon{color:var(--vscode-titleBar-inactiveForeground)}";
|
|
4
4
|
n(css,{});
|
|
5
5
|
|
|
6
6
|
export { css, css as default };
|
|
@@ -45,7 +45,6 @@ declare class TitlebarPart extends Part implements ITitleService {
|
|
|
45
45
|
private appIconBadge;
|
|
46
46
|
protected menubar?: HTMLElement;
|
|
47
47
|
protected layoutControls: HTMLElement | undefined;
|
|
48
|
-
private layoutToolbar;
|
|
49
48
|
protected lastLayoutDimensions: Dimension | undefined;
|
|
50
49
|
private hoverDelegate;
|
|
51
50
|
private readonly titleDisposables;
|
|
@@ -14,7 +14,7 @@ import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
|
|
|
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 'monaco-editor/esm/vs/base/common/platform.js';
|
|
16
16
|
import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
|
|
17
|
-
import { append, $, reset, prepend, EventType, addDisposableListener, EventHelper,
|
|
17
|
+
import { append, $, reset, prepend, EventType, addDisposableListener, EventHelper, Dimension } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
18
18
|
import { CustomMenubarControl } from 'vscode/vscode/vs/workbench/browser/parts/titlebar/menubarControl';
|
|
19
19
|
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
20
20
|
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
@@ -189,13 +189,13 @@ let TitlebarPart = class TitlebarPart extends Part {
|
|
|
189
189
|
if (this.titleBarStyle !== 'native') {
|
|
190
190
|
this.layoutControls = append(this.rightContent, $('div.layout-controls-container'));
|
|
191
191
|
this.layoutControls.classList.toggle('show-layout-control', this.layoutControlEnabled);
|
|
192
|
-
this.
|
|
192
|
+
this._register(this.instantiationService.createInstance(MenuWorkbenchToolBar, this.layoutControls, MenuId.LayoutControlMenu, {
|
|
193
193
|
contextMenu: MenuId.TitleBarContext,
|
|
194
194
|
toolbarOptions: { primaryGroup: () => true },
|
|
195
195
|
actionViewItemProvider: action => {
|
|
196
196
|
return createActionViewItem(this.instantiationService, action, { hoverDelegate: this.hoverDelegate });
|
|
197
197
|
}
|
|
198
|
-
});
|
|
198
|
+
}));
|
|
199
199
|
}
|
|
200
200
|
let primaryControlLocation = isMacintosh ? 'left' : 'right';
|
|
201
201
|
if (isMacintosh && isNative) {
|
|
@@ -214,23 +214,6 @@ let TitlebarPart = class TitlebarPart extends Part {
|
|
|
214
214
|
}
|
|
215
215
|
}));
|
|
216
216
|
});
|
|
217
|
-
this._register(addDisposableListener(this.element, EventType.MOUSE_DOWN, e => {
|
|
218
|
-
if (e.target && this.menubar && isAncestor(e.target, this.menubar)) {
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
if (e.target && this.layoutToolbar && isAncestor(e.target, this.layoutToolbar.getElement())) {
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
if (e.target && isAncestor(e.target, this.title)) {
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
const active = document.activeElement;
|
|
228
|
-
setTimeout(() => {
|
|
229
|
-
if (active instanceof HTMLElement) {
|
|
230
|
-
active.focus();
|
|
231
|
-
}
|
|
232
|
-
}, 0 );
|
|
233
|
-
}, true ));
|
|
234
217
|
this.updateStyles();
|
|
235
218
|
const that = this;
|
|
236
219
|
registerAction2(class FocusTitleBar extends Action2 {
|
|
@@ -242,7 +225,7 @@ let TitlebarPart = class TitlebarPart extends Part {
|
|
|
242
225
|
f1: true,
|
|
243
226
|
});
|
|
244
227
|
}
|
|
245
|
-
run(
|
|
228
|
+
run() {
|
|
246
229
|
if (that.customMenubar) {
|
|
247
230
|
that.customMenubar.toggleFocus();
|
|
248
231
|
}
|