@theia/core 1.61.0 → 1.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/i18n/nls.cs.json +158 -13
- package/i18n/nls.de.json +158 -13
- package/i18n/nls.es.json +158 -13
- package/i18n/nls.fr.json +158 -13
- package/i18n/nls.hu.json +158 -13
- package/i18n/nls.it.json +158 -13
- package/i18n/nls.ja.json +158 -13
- package/i18n/nls.json +159 -14
- package/i18n/nls.ko.json +158 -13
- package/i18n/nls.pl.json +158 -13
- package/i18n/nls.pt-br.json +158 -13
- package/i18n/nls.ru.json +158 -13
- package/i18n/nls.tr.json +158 -13
- package/i18n/nls.zh-cn.json +158 -13
- package/i18n/nls.zh-tw.json +158 -13
- package/lib/browser/catalog.json +197 -33
- package/lib/browser/common-frontend-contribution.d.ts +1 -1
- package/lib/browser/common-frontend-contribution.d.ts.map +1 -1
- package/lib/browser/common-frontend-contribution.js +13 -11
- package/lib/browser/common-frontend-contribution.js.map +1 -1
- package/lib/browser/context-menu-renderer.d.ts +14 -3
- package/lib/browser/context-menu-renderer.d.ts.map +1 -1
- package/lib/browser/context-menu-renderer.js +23 -1
- package/lib/browser/context-menu-renderer.js.map +1 -1
- package/lib/browser/frontend-application-module.d.ts.map +1 -1
- package/lib/browser/frontend-application-module.js +1 -3
- package/lib/browser/frontend-application-module.js.map +1 -1
- package/lib/browser/hover-service.d.ts.map +1 -1
- package/lib/browser/hover-service.js +7 -0
- package/lib/browser/hover-service.js.map +1 -1
- package/lib/browser/menu/action-menu-node.d.ts +36 -0
- package/lib/browser/menu/action-menu-node.d.ts.map +1 -0
- package/lib/browser/menu/action-menu-node.js +113 -0
- package/lib/browser/menu/action-menu-node.js.map +1 -0
- package/lib/browser/menu/browser-context-menu-renderer.d.ts +12 -4
- package/lib/browser/menu/browser-context-menu-renderer.d.ts.map +1 -1
- package/lib/browser/menu/browser-context-menu-renderer.js +12 -13
- package/lib/browser/menu/browser-context-menu-renderer.js.map +1 -1
- package/lib/browser/menu/browser-menu-module.d.ts.map +1 -1
- package/lib/browser/menu/browser-menu-module.js +4 -0
- package/lib/browser/menu/browser-menu-module.js.map +1 -1
- package/lib/browser/menu/browser-menu-node-factory.d.ts +13 -0
- package/lib/browser/menu/browser-menu-node-factory.d.ts.map +1 -0
- package/lib/browser/menu/browser-menu-node-factory.js +54 -0
- package/lib/browser/menu/browser-menu-node-factory.js.map +1 -0
- package/lib/browser/menu/browser-menu-plugin.d.ts +12 -30
- package/lib/browser/menu/browser-menu-plugin.d.ts.map +1 -1
- package/lib/browser/menu/browser-menu-plugin.js +78 -159
- package/lib/browser/menu/browser-menu-plugin.js.map +1 -1
- package/lib/browser/menu/composite-menu-node.d.ts +49 -0
- package/lib/browser/menu/composite-menu-node.d.ts.map +1 -0
- package/lib/browser/menu/composite-menu-node.js +127 -0
- package/lib/browser/menu/composite-menu-node.js.map +1 -0
- package/lib/browser/menu/menu.spec.d.ts.map +1 -0
- package/lib/{common → browser}/menu/menu.spec.js +38 -13
- package/lib/browser/menu/menu.spec.js.map +1 -0
- package/lib/browser/open-with-service.d.ts +1 -1
- package/lib/browser/saveable-service.d.ts.map +1 -1
- package/lib/browser/saveable-service.js +6 -1
- package/lib/browser/saveable-service.js.map +1 -1
- package/lib/browser/shell/application-shell.d.ts +7 -5
- package/lib/browser/shell/application-shell.d.ts.map +1 -1
- package/lib/browser/shell/application-shell.js +82 -28
- package/lib/browser/shell/application-shell.js.map +1 -1
- package/lib/browser/shell/index.d.ts +1 -0
- package/lib/browser/shell/index.d.ts.map +1 -1
- package/lib/browser/shell/index.js +1 -0
- package/lib/browser/shell/index.js.map +1 -1
- package/lib/browser/shell/sidebar-bottom-menu-widget.d.ts.map +1 -1
- package/lib/browser/shell/sidebar-bottom-menu-widget.js +2 -1
- package/lib/browser/shell/sidebar-bottom-menu-widget.js.map +1 -1
- package/lib/browser/shell/sidebar-menu-widget.d.ts +4 -1
- package/lib/browser/shell/sidebar-menu-widget.d.ts.map +1 -1
- package/lib/browser/shell/sidebar-menu-widget.js +14 -1
- package/lib/browser/shell/sidebar-menu-widget.js.map +1 -1
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar-menu-adapters.d.ts +66 -8
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar-menu-adapters.d.ts.map +1 -1
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar-menu-adapters.js +161 -8
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar-menu-adapters.js.map +1 -1
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar-registry.d.ts +18 -32
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar-registry.d.ts.map +1 -1
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar-registry.js +52 -88
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar-registry.js.map +1 -1
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar-types.d.ts +17 -21
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar-types.d.ts.map +1 -1
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar-types.js +9 -9
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar-types.js.map +1 -1
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.d.ts +7 -39
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.d.ts.map +1 -1
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.js +30 -238
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.js.map +1 -1
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.spec.js +13 -13
- package/lib/browser/shell/tab-bar-toolbar/tab-bar-toolbar.spec.js.map +1 -1
- package/lib/browser/shell/tab-bar-toolbar/tab-toolbar-item.d.ts +56 -0
- package/lib/browser/shell/tab-bar-toolbar/tab-toolbar-item.d.ts.map +1 -0
- package/lib/browser/shell/tab-bar-toolbar/tab-toolbar-item.js +208 -0
- package/lib/browser/shell/tab-bar-toolbar/tab-toolbar-item.js.map +1 -0
- package/lib/browser/shell/tab-bars.d.ts.map +1 -1
- package/lib/browser/shell/tab-bars.js +2 -1
- package/lib/browser/shell/tab-bars.js.map +1 -1
- package/lib/browser/shell/theia-dock-panel.d.ts +4 -10
- package/lib/browser/shell/theia-dock-panel.d.ts.map +1 -1
- package/lib/browser/shell/theia-dock-panel.js +7 -84
- package/lib/browser/shell/theia-dock-panel.js.map +1 -1
- package/lib/browser/shell/theia-split-panel.d.ts +6 -0
- package/lib/browser/shell/theia-split-panel.d.ts.map +1 -0
- package/lib/browser/shell/theia-split-panel.js +56 -0
- package/lib/browser/shell/theia-split-panel.js.map +1 -0
- package/lib/browser/tree/tree-widget.d.ts +1 -0
- package/lib/browser/tree/tree-widget.d.ts.map +1 -1
- package/lib/browser/tree/tree-widget.js +6 -0
- package/lib/browser/tree/tree-widget.js.map +1 -1
- package/lib/browser/view-container.d.ts +6 -3
- package/lib/browser/view-container.d.ts.map +1 -1
- package/lib/browser/view-container.js +36 -26
- package/lib/browser/view-container.js.map +1 -1
- package/lib/browser/window/default-secondary-window-service.d.ts +1 -0
- package/lib/browser/window/default-secondary-window-service.d.ts.map +1 -1
- package/lib/browser/window/default-secondary-window-service.js +3 -0
- package/lib/browser/window/default-secondary-window-service.js.map +1 -1
- package/lib/common/listener.d.ts +21 -0
- package/lib/common/listener.d.ts.map +1 -0
- package/lib/common/listener.js +81 -0
- package/lib/common/listener.js.map +1 -0
- package/lib/common/listener.spec.d.ts +2 -0
- package/lib/common/listener.spec.d.ts.map +1 -0
- package/lib/common/listener.spec.js +255 -0
- package/lib/common/listener.spec.js.map +1 -0
- package/lib/common/menu/index.d.ts +2 -3
- package/lib/common/menu/index.d.ts.map +1 -1
- package/lib/common/menu/index.js +2 -3
- package/lib/common/menu/index.js.map +1 -1
- package/lib/common/menu/menu-model-registry.d.ts +37 -50
- package/lib/common/menu/menu-model-registry.d.ts.map +1 -1
- package/lib/common/menu/menu-model-registry.js +176 -225
- package/lib/common/menu/menu-model-registry.js.map +1 -1
- package/lib/common/menu/menu-types.d.ts +58 -96
- package/lib/common/menu/menu-types.d.ts.map +1 -1
- package/lib/common/menu/menu-types.js +43 -39
- package/lib/common/menu/menu-types.js.map +1 -1
- package/lib/common/messaging/proxy-factory.d.ts.map +1 -1
- package/lib/common/messaging/proxy-factory.js +4 -0
- package/lib/common/messaging/proxy-factory.js.map +1 -1
- package/lib/electron-browser/menu/electron-context-menu-renderer.d.ts +15 -5
- package/lib/electron-browser/menu/electron-context-menu-renderer.d.ts.map +1 -1
- package/lib/electron-browser/menu/electron-context-menu-renderer.js +21 -14
- package/lib/electron-browser/menu/electron-context-menu-renderer.js.map +1 -1
- package/lib/electron-browser/menu/electron-main-menu-factory.d.ts +4 -16
- package/lib/electron-browser/menu/electron-main-menu-factory.d.ts.map +1 -1
- package/lib/electron-browser/menu/electron-main-menu-factory.js +84 -104
- package/lib/electron-browser/menu/electron-main-menu-factory.js.map +1 -1
- package/lib/electron-browser/menu/electron-menu-contribution.d.ts.map +1 -1
- package/lib/electron-browser/menu/electron-menu-contribution.js +1 -4
- package/lib/electron-browser/menu/electron-menu-contribution.js.map +1 -1
- package/lib/electron-browser/menu/electron-menu-module.d.ts.map +1 -1
- package/lib/electron-browser/menu/electron-menu-module.js +5 -0
- package/lib/electron-browser/menu/electron-menu-module.js.map +1 -1
- package/lib/electron-browser/window/electron-secondary-window-service.d.ts +1 -0
- package/lib/electron-browser/window/electron-secondary-window-service.d.ts.map +1 -1
- package/lib/electron-browser/window/electron-secondary-window-service.js +20 -0
- package/lib/electron-browser/window/electron-secondary-window-service.js.map +1 -1
- package/lib/electron-browser/window/electron-window-service.d.ts +3 -0
- package/lib/electron-browser/window/electron-window-service.d.ts.map +1 -1
- package/lib/electron-browser/window/electron-window-service.js +10 -1
- package/lib/electron-browser/window/electron-window-service.js.map +1 -1
- package/lib/electron-main/theia-electron-window.d.ts.map +1 -1
- package/lib/electron-main/theia-electron-window.js +2 -0
- package/lib/electron-main/theia-electron-window.js.map +1 -1
- package/package.json +7 -8
- package/src/browser/common-frontend-contribution.ts +14 -14
- package/src/browser/context-menu-renderer.ts +33 -5
- package/src/browser/frontend-application-module.ts +1 -7
- package/src/browser/hover-service.ts +7 -0
- package/src/browser/menu/action-menu-node.ts +128 -0
- package/src/browser/menu/browser-context-menu-renderer.ts +18 -11
- package/src/browser/menu/browser-menu-module.ts +4 -0
- package/src/browser/menu/browser-menu-node-factory.ts +48 -0
- package/src/browser/menu/browser-menu-plugin.ts +80 -168
- package/src/browser/menu/composite-menu-node.ts +140 -0
- package/src/{common → browser}/menu/menu.spec.ts +47 -15
- package/src/browser/open-with-service.ts +1 -1
- package/src/browser/saveable-service.ts +6 -1
- package/src/browser/shell/application-shell.ts +91 -29
- package/src/browser/shell/index.ts +1 -0
- package/src/browser/shell/sidebar-bottom-menu-widget.tsx +2 -1
- package/src/browser/shell/sidebar-menu-widget.tsx +12 -2
- package/src/browser/shell/tab-bar-toolbar/tab-bar-toolbar-menu-adapters.tsx +239 -0
- package/src/browser/shell/tab-bar-toolbar/tab-bar-toolbar-registry.ts +59 -102
- package/src/browser/shell/tab-bar-toolbar/tab-bar-toolbar-types.ts +14 -23
- package/src/browser/shell/tab-bar-toolbar/tab-bar-toolbar.spec.ts +14 -14
- package/src/browser/shell/tab-bar-toolbar/tab-bar-toolbar.tsx +34 -261
- package/src/browser/shell/tab-bar-toolbar/tab-toolbar-item.tsx +251 -0
- package/src/browser/shell/tab-bars.ts +2 -1
- package/src/browser/shell/theia-dock-panel.ts +10 -91
- package/src/browser/shell/theia-split-panel.ts +56 -0
- package/src/browser/style/hover-service.css +6 -1
- package/src/browser/style/index.css +3 -11
- package/src/browser/style/view-container.css +17 -31
- package/src/browser/tree/tree-widget.tsx +7 -0
- package/src/browser/view-container.ts +51 -30
- package/src/browser/window/default-secondary-window-service.ts +4 -0
- package/src/common/listener.spec.ts +315 -0
- package/src/common/listener.ts +88 -0
- package/src/common/menu/index.ts +2 -3
- package/src/common/menu/menu-model-registry.ts +187 -230
- package/src/common/menu/menu-types.ts +82 -128
- package/src/common/messaging/proxy-factory.ts +4 -1
- package/src/electron-browser/menu/electron-context-menu-renderer.ts +29 -13
- package/src/electron-browser/menu/electron-main-menu-factory.ts +92 -116
- package/src/electron-browser/menu/electron-menu-contribution.ts +1 -4
- package/src/electron-browser/menu/electron-menu-module.ts +6 -1
- package/src/electron-browser/window/electron-secondary-window-service.ts +22 -0
- package/src/electron-browser/window/electron-window-service.ts +11 -1
- package/src/electron-main/theia-electron-window.ts +2 -0
- package/lib/common/menu/action-menu-node.d.ts +0 -20
- package/lib/common/menu/action-menu-node.d.ts.map +0 -1
- package/lib/common/menu/action-menu-node.js +0 -57
- package/lib/common/menu/action-menu-node.js.map +0 -1
- package/lib/common/menu/composite-menu-node.d.ts +0 -47
- package/lib/common/menu/composite-menu-node.d.ts.map +0 -1
- package/lib/common/menu/composite-menu-node.js +0 -96
- package/lib/common/menu/composite-menu-node.js.map +0 -1
- package/lib/common/menu/composite-menu-node.spec.d.ts +0 -2
- package/lib/common/menu/composite-menu-node.spec.d.ts.map +0 -1
- package/lib/common/menu/composite-menu-node.spec.js +0 -68
- package/lib/common/menu/composite-menu-node.spec.js.map +0 -1
- package/lib/common/menu/menu-adapter.d.ts +0 -36
- package/lib/common/menu/menu-adapter.d.ts.map +0 -1
- package/lib/common/menu/menu-adapter.js +0 -93
- package/lib/common/menu/menu-adapter.js.map +0 -1
- package/lib/common/menu/menu.spec.d.ts.map +0 -1
- package/lib/common/menu/menu.spec.js.map +0 -1
- package/lib/common/test/mock-menu.d.ts +0 -8
- package/lib/common/test/mock-menu.d.ts.map +0 -1
- package/lib/common/test/mock-menu.js +0 -35
- package/lib/common/test/mock-menu.js.map +0 -1
- package/src/browser/shell/tab-bar-toolbar/tab-bar-toolbar-menu-adapters.ts +0 -31
- package/src/common/menu/action-menu-node.ts +0 -65
- package/src/common/menu/composite-menu-node.spec.ts +0 -67
- package/src/common/menu/composite-menu-node.ts +0 -116
- package/src/common/menu/menu-adapter.ts +0 -103
- package/src/common/test/mock-menu.ts +0 -35
- /package/lib/{common → browser}/menu/menu.spec.d.ts +0 -0
|
@@ -15,17 +15,14 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { find, toArray } from '@lumino/algorithm';
|
|
18
|
-
import { TabBar, Widget, DockPanel, Title
|
|
18
|
+
import { TabBar, Widget, DockPanel, Title } from '@lumino/widgets';
|
|
19
19
|
import { Signal } from '@lumino/signaling';
|
|
20
20
|
import { Disposable, DisposableCollection } from '../../common/disposable';
|
|
21
|
-
import { UnsafeWidgetUtilities } from '../widgets';
|
|
22
21
|
import { CorePreferences } from '../core-preferences';
|
|
23
22
|
import { Emitter, Event, environment } from '../../common';
|
|
24
23
|
import { ToolbarAwareTabBar } from './tab-bars';
|
|
25
24
|
|
|
26
|
-
export const MAXIMIZED_CLASS = 'theia-maximized';
|
|
27
25
|
export const ACTIVE_TABBAR_CLASS = 'theia-tabBar-active';
|
|
28
|
-
const VISIBLE_MENU_MAXIMIZED_CLASS = 'theia-visible-menu-maximized';
|
|
29
26
|
|
|
30
27
|
export const MAIN_AREA_ID = 'theia-main-content-panel';
|
|
31
28
|
export const BOTTOM_AREA_ID = 'theia-bottom-content-panel';
|
|
@@ -49,15 +46,15 @@ export class TheiaDockPanel extends DockPanel {
|
|
|
49
46
|
*/
|
|
50
47
|
readonly widgetRemoved = new Signal<this, Widget>(this);
|
|
51
48
|
|
|
52
|
-
protected readonly onDidToggleMaximizedEmitter = new Emitter<Widget>();
|
|
53
|
-
readonly onDidToggleMaximized = this.onDidToggleMaximizedEmitter.event;
|
|
54
49
|
protected readonly onDidChangeCurrentEmitter = new Emitter<Title<Widget> | undefined>();
|
|
50
|
+
|
|
55
51
|
get onDidChangeCurrent(): Event<Title<Widget> | undefined> {
|
|
56
52
|
return this.onDidChangeCurrentEmitter.event;
|
|
57
53
|
}
|
|
58
54
|
|
|
59
55
|
constructor(options?: DockPanel.IOptions,
|
|
60
|
-
protected readonly preferences?: CorePreferences
|
|
56
|
+
protected readonly preferences?: CorePreferences,
|
|
57
|
+
protected readonly maximizeCallback?: (area: TheiaDockPanel) => void
|
|
61
58
|
) {
|
|
62
59
|
super(options);
|
|
63
60
|
this['_onCurrentChanged'] = (sender: TabBar<Widget>, args: TabBar.ICurrentChangedArgs<Widget>) => {
|
|
@@ -77,12 +74,11 @@ export class TheiaDockPanel extends DockPanel {
|
|
|
77
74
|
this.markAsCurrent(args.title);
|
|
78
75
|
super['_onTabActivateRequested'](sender, args);
|
|
79
76
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
toggleMaximized(): void {
|
|
80
|
+
if (this.maximizeCallback) {
|
|
81
|
+
this.maximizeCallback(this);
|
|
86
82
|
}
|
|
87
83
|
}
|
|
88
84
|
|
|
@@ -90,19 +86,6 @@ export class TheiaDockPanel extends DockPanel {
|
|
|
90
86
|
return environment.electron.is();
|
|
91
87
|
}
|
|
92
88
|
|
|
93
|
-
protected handleMenuBarVisibility(newValue: string): void {
|
|
94
|
-
const areaContainer = this.node.parentElement;
|
|
95
|
-
const maximizedElement = this.getMaximizedElement();
|
|
96
|
-
|
|
97
|
-
if (areaContainer === maximizedElement) {
|
|
98
|
-
if (newValue === 'visible') {
|
|
99
|
-
this.addClass(VISIBLE_MENU_MAXIMIZED_CLASS);
|
|
100
|
-
} else {
|
|
101
|
-
this.removeClass(VISIBLE_MENU_MAXIMIZED_CLASS);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
89
|
protected _currentTitle: Title<Widget> | undefined;
|
|
107
90
|
get currentTitle(): Title<Widget> | undefined {
|
|
108
91
|
return this._currentTitle;
|
|
@@ -195,75 +178,11 @@ export class TheiaDockPanel extends DockPanel {
|
|
|
195
178
|
}
|
|
196
179
|
return undefined;
|
|
197
180
|
}
|
|
198
|
-
|
|
199
|
-
protected readonly toDisposeOnToggleMaximized = new DisposableCollection();
|
|
200
|
-
toggleMaximized(): void {
|
|
201
|
-
const areaContainer = this.node.parentElement;
|
|
202
|
-
if (!areaContainer) {
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
const maximizedElement = this.getMaximizedElement();
|
|
206
|
-
if (areaContainer === maximizedElement) {
|
|
207
|
-
this.toDisposeOnToggleMaximized.dispose();
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
if (this.isAttached) {
|
|
211
|
-
UnsafeWidgetUtilities.detach(this);
|
|
212
|
-
}
|
|
213
|
-
maximizedElement.style.display = 'block';
|
|
214
|
-
this.addClass(MAXIMIZED_CLASS);
|
|
215
|
-
const preference = this.preferences?.get('window.menuBarVisibility');
|
|
216
|
-
if (!this.isElectron() && preference === 'visible') {
|
|
217
|
-
this.addClass(VISIBLE_MENU_MAXIMIZED_CLASS);
|
|
218
|
-
}
|
|
219
|
-
UnsafeWidgetUtilities.attach(this, maximizedElement);
|
|
220
|
-
this.fit();
|
|
221
|
-
this.onDidToggleMaximizedEmitter.fire(this);
|
|
222
|
-
this.toDisposeOnToggleMaximized.push(Disposable.create(() => {
|
|
223
|
-
maximizedElement.style.display = 'none';
|
|
224
|
-
this.removeClass(MAXIMIZED_CLASS);
|
|
225
|
-
this.onDidToggleMaximizedEmitter.fire(this);
|
|
226
|
-
if (!this.isElectron()) {
|
|
227
|
-
this.removeClass(VISIBLE_MENU_MAXIMIZED_CLASS);
|
|
228
|
-
}
|
|
229
|
-
if (this.isAttached) {
|
|
230
|
-
UnsafeWidgetUtilities.detach(this);
|
|
231
|
-
}
|
|
232
|
-
UnsafeWidgetUtilities.attach(this, areaContainer);
|
|
233
|
-
this.fit();
|
|
234
|
-
}));
|
|
235
|
-
|
|
236
|
-
const layout = this.layout;
|
|
237
|
-
if (layout instanceof DockLayout) {
|
|
238
|
-
const onResize = layout['onResize'];
|
|
239
|
-
layout['onResize'] = () => onResize.bind(layout)(Widget.ResizeMessage.UnknownSize);
|
|
240
|
-
this.toDisposeOnToggleMaximized.push(Disposable.create(() => layout['onResize'] = onResize));
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
const removedListener = () => {
|
|
244
|
-
if (!this.widgets().next()) {
|
|
245
|
-
this.toDisposeOnToggleMaximized.dispose();
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
this.widgetRemoved.connect(removedListener);
|
|
249
|
-
this.toDisposeOnToggleMaximized.push(Disposable.create(() => this.widgetRemoved.disconnect(removedListener)));
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
protected maximizedElement: HTMLElement | undefined;
|
|
253
|
-
protected getMaximizedElement(): HTMLElement {
|
|
254
|
-
if (!this.maximizedElement) {
|
|
255
|
-
this.maximizedElement = document.createElement('div');
|
|
256
|
-
this.maximizedElement.style.display = 'none';
|
|
257
|
-
document.body.appendChild(this.maximizedElement);
|
|
258
|
-
}
|
|
259
|
-
return this.maximizedElement;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
181
|
}
|
|
263
182
|
export namespace TheiaDockPanel {
|
|
264
183
|
export const Factory = Symbol('TheiaDockPanel#Factory');
|
|
265
184
|
export interface Factory {
|
|
266
|
-
(options?: DockPanel.IOptions): TheiaDockPanel;
|
|
185
|
+
(options?: DockPanel.IOptions, maximizeCallback?: (area: TheiaDockPanel) => void): TheiaDockPanel;
|
|
267
186
|
}
|
|
268
187
|
|
|
269
188
|
export interface AddOptions extends DockPanel.IAddOptions {
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2025 STMicroelectronics and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { SplitLayout, SplitPanel } from '@lumino/widgets';
|
|
18
|
+
|
|
19
|
+
export class TheiaSplitPanel extends SplitPanel {
|
|
20
|
+
constructor(options?: SplitPanel.IOptions) {
|
|
21
|
+
super(options);
|
|
22
|
+
|
|
23
|
+
let oldCursor: string | undefined;
|
|
24
|
+
let pointerId: number | undefined;
|
|
25
|
+
|
|
26
|
+
this['_evtPointerDown'] = (event: PointerEvent) => {
|
|
27
|
+
super['_evtPointerDown'](event);
|
|
28
|
+
if (this['_pressData']) { // indicating that the drag has started
|
|
29
|
+
this.node.setPointerCapture(event.pointerId);
|
|
30
|
+
pointerId = event.pointerId;
|
|
31
|
+
const layout = this.layout as SplitLayout;
|
|
32
|
+
const handle = layout.handles.find(h => h.contains(event.target as HTMLElement));
|
|
33
|
+
if (handle) {
|
|
34
|
+
const style = window.getComputedStyle(handle);
|
|
35
|
+
oldCursor = this.node.style.cursor;
|
|
36
|
+
this.node.style.cursor = style.cursor;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
this['_releaseMouse'] = () => {
|
|
41
|
+
super['_releaseMouse']();
|
|
42
|
+
if (oldCursor !== undefined) {
|
|
43
|
+
this.node.style.cursor = oldCursor;
|
|
44
|
+
oldCursor = undefined;
|
|
45
|
+
}
|
|
46
|
+
if (pointerId) {
|
|
47
|
+
this.node.releasePointerCapture(pointerId);
|
|
48
|
+
pointerId = undefined;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
override handleEvent(event: Event): void {
|
|
54
|
+
super.handleEvent(event);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -29,7 +29,12 @@
|
|
|
29
29
|
border: 1px solid var(--theia-editorHoverWidget-border);
|
|
30
30
|
padding: var(--theia-ui-padding);
|
|
31
31
|
max-width: var(--theia-hover-max-width);
|
|
32
|
-
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* overwrite potentially different default user agent styles */
|
|
35
|
+
.theia-hover[popover] {
|
|
36
|
+
inset: unset;
|
|
37
|
+
overflow: visible;
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
.theia-hover .hover-row:not(:first-child):not(:empty) {
|
|
@@ -90,6 +90,7 @@ body {
|
|
|
90
90
|
color: var(--theia-foreground);
|
|
91
91
|
border: 1px solid var(--theia-window-activeBorder);
|
|
92
92
|
}
|
|
93
|
+
|
|
93
94
|
body:window-inactive,
|
|
94
95
|
body:-moz-window-inactive {
|
|
95
96
|
border-color: var(--theia-window-inactiveBorder);
|
|
@@ -139,19 +140,10 @@ blockquote {
|
|
|
139
140
|
}
|
|
140
141
|
|
|
141
142
|
.theia-maximized {
|
|
142
|
-
position: fixed !important;
|
|
143
143
|
top: 0 !important;
|
|
144
|
-
bottom: 0 !important;
|
|
145
144
|
left: 0 !important;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
height: auto !important;
|
|
149
|
-
z-index: 255 !important;
|
|
150
|
-
background: var(--theia-editor-background);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.theia-visible-menu-maximized {
|
|
154
|
-
top: var(--theia-private-menubar-height) !important;
|
|
145
|
+
width: 100% !important;
|
|
146
|
+
height: 100% !important;
|
|
155
147
|
}
|
|
156
148
|
|
|
157
149
|
.theia-ApplicationShell {
|
|
@@ -16,9 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
:root {
|
|
18
18
|
--theia-view-container-title-height: var(--theia-content-line-height);
|
|
19
|
-
--theia-view-container-content-height: calc(
|
|
20
|
-
100% - var(--theia-view-container-title-height)
|
|
21
|
-
);
|
|
19
|
+
--theia-view-container-content-height: calc(100% - var(--theia-view-container-title-height));
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
.theia-view-container {
|
|
@@ -27,36 +25,36 @@
|
|
|
27
25
|
flex-direction: column;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
.theia-view-container
|
|
28
|
+
.theia-view-container>.lm-SplitPanel {
|
|
31
29
|
height: 100%;
|
|
32
30
|
width: 100%;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
|
-
.theia-view-container
|
|
33
|
+
.theia-view-container>.lm-SplitPanel>.lm-SplitPanel-child {
|
|
36
34
|
min-width: 50px;
|
|
37
35
|
min-height: var(--theia-content-line-height);
|
|
38
36
|
}
|
|
39
37
|
|
|
40
|
-
.theia-view-container
|
|
38
|
+
.theia-view-container>.lm-SplitPanel>.lm-SplitPanel-handle::after {
|
|
41
39
|
min-height: 2px;
|
|
42
40
|
min-width: 2px;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
|
-
.lm-SplitPanel
|
|
43
|
+
.lm-SplitPanel>.lm-SplitPanel-handle:hover::after {
|
|
46
44
|
background-color: var(--theia-sash-hoverBorder);
|
|
47
45
|
transition-delay: var(--theia-sash-hoverDelay);
|
|
48
46
|
}
|
|
49
47
|
|
|
50
|
-
.lm-SplitPanel
|
|
48
|
+
.lm-SplitPanel>.lm-SplitPanel-handle:active::after {
|
|
51
49
|
background-color: var(--theia-sash-activeBorder);
|
|
52
50
|
transition-delay: 0s !important;
|
|
53
51
|
}
|
|
54
52
|
|
|
55
|
-
.lm-SplitPanel[data-orientation="horizontal"]
|
|
53
|
+
.lm-SplitPanel[data-orientation="horizontal"]>.lm-SplitPanel-handle::after {
|
|
56
54
|
min-width: var(--theia-sash-width);
|
|
57
55
|
}
|
|
58
56
|
|
|
59
|
-
.lm-SplitPanel[data-orientation="vertical"]
|
|
57
|
+
.lm-SplitPanel[data-orientation="vertical"]>.lm-SplitPanel-handle::after {
|
|
60
58
|
min-height: var(--theia-sash-width);
|
|
61
59
|
}
|
|
62
60
|
|
|
@@ -76,11 +74,11 @@
|
|
|
76
74
|
overflow: hidden;
|
|
77
75
|
}
|
|
78
76
|
|
|
79
|
-
.lm-Widget
|
|
77
|
+
.lm-Widget>.theia-view-container-part-header {
|
|
80
78
|
box-shadow: 0 1px 0 var(--theia-sideBarSectionHeader-border) inset;
|
|
81
79
|
}
|
|
82
80
|
|
|
83
|
-
.lm-Widget.lm-first-visible
|
|
81
|
+
.lm-Widget.lm-first-visible>.theia-view-container-part-header {
|
|
84
82
|
box-shadow: none;
|
|
85
83
|
}
|
|
86
84
|
|
|
@@ -88,20 +86,12 @@
|
|
|
88
86
|
padding-left: 4px;
|
|
89
87
|
}
|
|
90
88
|
|
|
91
|
-
.theia-view-container
|
|
92
|
-
> .lm-SplitPanel[data-orientation="horizontal"]
|
|
93
|
-
.part
|
|
94
|
-
> .theia-header
|
|
95
|
-
.theia-ExpansionToggle::before {
|
|
89
|
+
.theia-view-container>.lm-SplitPanel[data-orientation="horizontal"] .part>.theia-header .theia-ExpansionToggle::before {
|
|
96
90
|
display: none;
|
|
97
91
|
padding-left: 0px;
|
|
98
92
|
}
|
|
99
93
|
|
|
100
|
-
.theia-view-container
|
|
101
|
-
> .lm-SplitPanel[data-orientation="horizontal"]
|
|
102
|
-
.part
|
|
103
|
-
> .theia-header
|
|
104
|
-
.theia-ExpansionToggle {
|
|
94
|
+
.theia-view-container>.lm-SplitPanel[data-orientation="horizontal"] .part>.theia-header .theia-ExpansionToggle {
|
|
105
95
|
padding-left: 0px;
|
|
106
96
|
}
|
|
107
97
|
|
|
@@ -127,19 +117,19 @@
|
|
|
127
117
|
margin-right: 12px;
|
|
128
118
|
}
|
|
129
119
|
|
|
130
|
-
.theia-view-container .part
|
|
120
|
+
.theia-view-container .part>.body {
|
|
131
121
|
height: var(--theia-view-container-content-height);
|
|
132
122
|
min-width: 50px;
|
|
133
123
|
min-height: 50px;
|
|
134
124
|
position: relative;
|
|
135
125
|
}
|
|
136
126
|
|
|
137
|
-
.theia-view-container .part
|
|
127
|
+
.theia-view-container .part>.body .theia-tree-source-node-placeholder {
|
|
138
128
|
padding-top: 4px;
|
|
139
129
|
height: 100%;
|
|
140
130
|
}
|
|
141
131
|
|
|
142
|
-
.theia-view-container .part:hover
|
|
132
|
+
.theia-view-container .part:hover>.body {
|
|
143
133
|
display: block;
|
|
144
134
|
}
|
|
145
135
|
|
|
@@ -174,12 +164,8 @@
|
|
|
174
164
|
}
|
|
175
165
|
|
|
176
166
|
.theia-view-container-part-title.menu-open,
|
|
177
|
-
.lm-Widget.part:not(.collapsed):hover
|
|
178
|
-
|
|
179
|
-
.theia-view-container-part-title,
|
|
180
|
-
.lm-Widget.part:not(.collapsed):focus-within
|
|
181
|
-
.theia-view-container-part-header
|
|
182
|
-
.theia-view-container-part-title {
|
|
167
|
+
.lm-Widget.part:not(.collapsed):hover .theia-view-container-part-header .theia-view-container-part-title,
|
|
168
|
+
.lm-Widget.part:not(.collapsed):focus-within .theia-view-container-part-header .theia-view-container-part-title {
|
|
183
169
|
display: flex;
|
|
184
170
|
}
|
|
185
171
|
|
|
@@ -445,6 +445,13 @@ export class TreeWidget extends ReactWidget implements StatefulWidget {
|
|
|
445
445
|
super.onUpdateRequest(msg);
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
+
protected override handleVisiblityChanged(isNowVisible: boolean): void {
|
|
449
|
+
super.handleVisiblityChanged(isNowVisible);
|
|
450
|
+
if (isNowVisible) {
|
|
451
|
+
this.update();
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
448
455
|
protected override onResize(msg: Widget.ResizeMessage): void {
|
|
449
456
|
super.onResize(msg);
|
|
450
457
|
this.update();
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
import { Event as CommonEvent, Emitter } from '../common/event';
|
|
24
24
|
import { Disposable, DisposableCollection } from '../common/disposable';
|
|
25
25
|
import { CommandRegistry } from '../common/command';
|
|
26
|
-
import { MenuModelRegistry, MenuPath, MenuAction } from '../common/menu';
|
|
26
|
+
import { MenuModelRegistry, MenuPath, MenuAction, SubmenuImpl, ActionMenuNode, MenuNode, RenderedMenuNode } from '../common/menu';
|
|
27
27
|
import { ApplicationShell, StatefulWidget, SplitPositionHandler, SplitPositionOptions, SIDE_PANEL_TOOLBAR_CONTEXT_MENU } from './shell';
|
|
28
28
|
import { MAIN_AREA_ID, BOTTOM_AREA_ID } from './shell/theia-dock-panel';
|
|
29
29
|
import { FrontendApplicationStateService } from './frontend-application-state';
|
|
30
30
|
import { ContextMenuRenderer, Anchor } from './context-menu-renderer';
|
|
31
31
|
import { parseCssMagnitude } from './browser';
|
|
32
|
-
import { TabBarToolbarRegistry, TabBarToolbarFactory, TabBarToolbar, TabBarDelegator
|
|
32
|
+
import { TabBarToolbarRegistry, TabBarToolbarFactory, TabBarToolbar, TabBarDelegator } from './shell/tab-bar-toolbar';
|
|
33
33
|
import { isEmpty, isObject, nls } from '../common';
|
|
34
34
|
import { WidgetManager } from './widget-manager';
|
|
35
35
|
import { Key } from './keys';
|
|
@@ -38,6 +38,10 @@ import { Drag } from '@lumino/dragdrop';
|
|
|
38
38
|
import { MimeData } from '@lumino/coreutils';
|
|
39
39
|
import { ElementExt } from '@lumino/domutils';
|
|
40
40
|
import { TabBarDecoratorService } from './shell/tab-bar-decorator';
|
|
41
|
+
import { ContextKeyService } from './context-key-service';
|
|
42
|
+
import { KeybindingRegistry } from './keybinding';
|
|
43
|
+
import { ToolbarMenuNodeWrapper } from './shell/tab-bar-toolbar/tab-bar-toolbar-menu-adapters';
|
|
44
|
+
import { TheiaSplitPanel } from './shell/theia-split-panel';
|
|
41
45
|
|
|
42
46
|
export interface ViewContainerTitleOptions {
|
|
43
47
|
label: string;
|
|
@@ -90,6 +94,26 @@ export namespace DynamicToolbarWidget {
|
|
|
90
94
|
}
|
|
91
95
|
}
|
|
92
96
|
|
|
97
|
+
class PartsMenuToolbarItem extends ToolbarMenuNodeWrapper {
|
|
98
|
+
constructor(
|
|
99
|
+
protected readonly target: () => Widget | undefined,
|
|
100
|
+
effectiveMenuPath: MenuPath,
|
|
101
|
+
commandRegistry: CommandRegistry,
|
|
102
|
+
menuRegistry: MenuModelRegistry,
|
|
103
|
+
contextKeyService: ContextKeyService,
|
|
104
|
+
contextMenuRenderer: ContextMenuRenderer,
|
|
105
|
+
menuNode: MenuNode & RenderedMenuNode,
|
|
106
|
+
group: string | undefined,
|
|
107
|
+
menuPath?: MenuPath,
|
|
108
|
+
) {
|
|
109
|
+
super(effectiveMenuPath, commandRegistry, menuRegistry, contextKeyService, contextMenuRenderer, menuNode, group, menuPath);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
override isVisible(widget: Widget): boolean {
|
|
113
|
+
return widget === this.target() && super.isVisible(widget);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
93
117
|
/**
|
|
94
118
|
* A view container holds an arbitrary number of widgets inside a split panel.
|
|
95
119
|
* Each widget is wrapped in a _part_ that displays the widget title and toolbar
|
|
@@ -146,13 +170,20 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica
|
|
|
146
170
|
@inject(TabBarDecoratorService)
|
|
147
171
|
protected readonly decoratorService: TabBarDecoratorService;
|
|
148
172
|
|
|
173
|
+
@inject(ContextKeyService)
|
|
174
|
+
protected readonly contextKeyService: ContextKeyService;
|
|
175
|
+
|
|
176
|
+
@inject(KeybindingRegistry)
|
|
177
|
+
protected readonly keybindingRegistry: KeybindingRegistry;
|
|
178
|
+
|
|
149
179
|
@postConstruct()
|
|
150
180
|
protected init(): void {
|
|
181
|
+
this.toDispose.push(Disposable.create(() => { this.toDisposeOnUpdateTitle.dispose(); }));
|
|
151
182
|
this.id = this.options.id;
|
|
152
183
|
this.addClass('theia-view-container');
|
|
153
184
|
const layout = new PanelLayout();
|
|
154
185
|
this.layout = layout;
|
|
155
|
-
this.panel = new
|
|
186
|
+
this.panel = new TheiaSplitPanel({
|
|
156
187
|
layout: new ViewContainerLayout({
|
|
157
188
|
renderer: SplitPanel.defaultRenderer,
|
|
158
189
|
orientation: this.orientation,
|
|
@@ -243,7 +274,7 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica
|
|
|
243
274
|
this.updateTitle();
|
|
244
275
|
}
|
|
245
276
|
|
|
246
|
-
protected
|
|
277
|
+
protected toDisposeOnUpdateTitle = new DisposableCollection();
|
|
247
278
|
|
|
248
279
|
protected _tabBarDelegate: Widget = this;
|
|
249
280
|
updateTabBarDelegate(): void {
|
|
@@ -261,7 +292,7 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica
|
|
|
261
292
|
|
|
262
293
|
protected updateTitle(): void {
|
|
263
294
|
this.toDisposeOnUpdateTitle.dispose();
|
|
264
|
-
this.
|
|
295
|
+
this.toDisposeOnUpdateTitle = new DisposableCollection();
|
|
265
296
|
this.updateTabBarDelegate();
|
|
266
297
|
let title = Object.assign({}, this.titleOptions);
|
|
267
298
|
if (isEmpty(title)) {
|
|
@@ -315,36 +346,26 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica
|
|
|
315
346
|
|
|
316
347
|
protected updateToolbarItems(allParts: ViewContainerPart[]): void {
|
|
317
348
|
if (allParts.length > 1) {
|
|
318
|
-
const group = this.getToggleVisibilityGroupLabel();
|
|
349
|
+
const group = new SubmenuImpl(`toggleParts-${this.id}`, this.getToggleVisibilityGroupLabel(), undefined, '000');
|
|
319
350
|
for (const part of allParts) {
|
|
320
351
|
const existingId = this.toggleVisibilityCommandId(part);
|
|
321
|
-
const {
|
|
322
|
-
|
|
352
|
+
const { label } = part.wrapped.title;
|
|
353
|
+
group.addNode(new ActionMenuNode({
|
|
354
|
+
commandId: existingId,
|
|
355
|
+
label: label
|
|
356
|
+
}, this.commandRegistry, this.keybindingRegistry, this.contextKeyService));
|
|
323
357
|
}
|
|
358
|
+
|
|
359
|
+
// widget === this.getTabBarDelegate()
|
|
360
|
+
|
|
361
|
+
const toolbarItem = new PartsMenuToolbarItem(() => this.getTabBarDelegate(), [this.id], this.commandRegistry, this.menuRegistry,
|
|
362
|
+
this.contextKeyService, this.contextMenuRenderer, group, '000_views', [this.id]);
|
|
363
|
+
this.toDisposeOnUpdateTitle.push(this.toolbarRegistry.doRegisterItem(toolbarItem));
|
|
324
364
|
}
|
|
325
365
|
}
|
|
326
366
|
|
|
327
367
|
protected getToggleVisibilityGroupLabel(): string {
|
|
328
|
-
return '
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
protected registerToolbarItem(commandId: string, options?: Partial<Omit<RenderedToolbarItem, 'id' | 'command'>>): void {
|
|
332
|
-
const newId = `${this.id}-tabbar-toolbar-${commandId}`;
|
|
333
|
-
const existingHandler = this.commandRegistry.getAllHandlers(commandId)[0];
|
|
334
|
-
const existingCommand = this.commandRegistry.getCommand(commandId);
|
|
335
|
-
if (existingHandler && existingCommand) {
|
|
336
|
-
this.toDisposeOnUpdateTitle.push(this.commandRegistry.registerCommand({ ...existingCommand, id: newId }, {
|
|
337
|
-
execute: (_widget, ...args) => this.commandRegistry.executeCommand(commandId, ...args),
|
|
338
|
-
isToggled: (_widget, ...args) => this.commandRegistry.isToggled(commandId, ...args),
|
|
339
|
-
isEnabled: (_widget, ...args) => this.commandRegistry.isEnabled(commandId, ...args),
|
|
340
|
-
isVisible: (widget, ...args) => widget === this.getTabBarDelegate() && this.commandRegistry.isVisible(commandId, ...args),
|
|
341
|
-
}));
|
|
342
|
-
this.toDisposeOnUpdateTitle.push(this.toolbarRegistry.registerItem({
|
|
343
|
-
...options,
|
|
344
|
-
id: newId,
|
|
345
|
-
command: newId,
|
|
346
|
-
}));
|
|
347
|
-
}
|
|
368
|
+
return 'Views';
|
|
348
369
|
}
|
|
349
370
|
|
|
350
371
|
protected findOriginalPart(): ViewContainerPart | undefined {
|
|
@@ -593,8 +614,8 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica
|
|
|
593
614
|
}
|
|
594
615
|
return false;
|
|
595
616
|
},
|
|
596
|
-
isEnabled: arg => toRegister.canHide && (!this.titleOptions || !(arg instanceof Widget) ||
|
|
597
|
-
isVisible: arg => !this.titleOptions || !(arg instanceof Widget) ||
|
|
617
|
+
isEnabled: arg => toRegister.canHide && (!this.titleOptions || !(arg instanceof Widget) || arg === this.getTabBarDelegate()),
|
|
618
|
+
isVisible: arg => !this.titleOptions || !(arg instanceof Widget) || arg === this.getTabBarDelegate()
|
|
598
619
|
});
|
|
599
620
|
}
|
|
600
621
|
|
|
@@ -80,6 +80,10 @@ export class DefaultSecondaryWindowService implements SecondaryWindowService {
|
|
|
80
80
|
});
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
+
this.registerShutdownListeners();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
protected registerShutdownListeners(): void {
|
|
83
87
|
// Close all open windows when the main window is closed.
|
|
84
88
|
this.windowService.onUnload(() => {
|
|
85
89
|
// Iterate backwards because calling window.close might remove the window from the array
|