@theia/core 1.32.0-next.8 → 1.32.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 +6 -6
- package/i18n/nls.cs.json +14 -13
- package/i18n/nls.de.json +14 -13
- package/i18n/nls.es.json +14 -13
- package/i18n/nls.fr.json +14 -13
- package/i18n/nls.hu.json +14 -13
- package/i18n/nls.it.json +14 -13
- package/i18n/nls.ja.json +14 -13
- package/i18n/nls.json +16 -15
- package/i18n/nls.pl.json +14 -13
- package/i18n/nls.pt-br.json +14 -13
- package/i18n/nls.pt-pt.json +14 -13
- package/i18n/nls.ru.json +14 -13
- package/i18n/nls.zh-cn.json +23 -22
- package/lib/browser/context-key-service.d.ts +20 -8
- package/lib/browser/context-key-service.d.ts.map +1 -1
- package/lib/browser/context-key-service.js +6 -0
- package/lib/browser/context-key-service.js.map +1 -1
- package/lib/browser/context-menu-renderer.d.ts +2 -0
- package/lib/browser/context-menu-renderer.d.ts.map +1 -1
- package/lib/browser/context-menu-renderer.js.map +1 -1
- package/lib/browser/core-preferences.d.ts.map +1 -1
- package/lib/browser/core-preferences.js +8 -9
- package/lib/browser/core-preferences.js.map +1 -1
- package/lib/browser/frontend-application-module.d.ts.map +1 -1
- package/lib/browser/frontend-application-module.js +4 -1
- package/lib/browser/frontend-application-module.js.map +1 -1
- package/lib/browser/hover-service.d.ts +41 -0
- package/lib/browser/hover-service.d.ts.map +1 -0
- package/lib/browser/hover-service.js +191 -0
- package/lib/browser/hover-service.js.map +1 -0
- package/lib/browser/icon-theme-service.js +1 -1
- package/lib/browser/icon-theme-service.js.map +1 -1
- package/lib/browser/index.d.ts +1 -0
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +1 -0
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/menu/browser-context-menu-renderer.d.ts +1 -1
- package/lib/browser/menu/browser-context-menu-renderer.d.ts.map +1 -1
- package/lib/browser/menu/browser-context-menu-renderer.js +2 -2
- package/lib/browser/menu/browser-context-menu-renderer.js.map +1 -1
- package/lib/browser/menu/browser-menu-plugin.d.ts +4 -3
- package/lib/browser/menu/browser-menu-plugin.d.ts.map +1 -1
- package/lib/browser/menu/browser-menu-plugin.js +9 -6
- package/lib/browser/menu/browser-menu-plugin.js.map +1 -1
- package/lib/browser/resource-context-key.d.ts +2 -3
- package/lib/browser/resource-context-key.d.ts.map +1 -1
- package/lib/browser/resource-context-key.js +2 -4
- package/lib/browser/resource-context-key.js.map +1 -1
- package/lib/browser/shell/application-shell.d.ts.map +1 -1
- package/lib/browser/shell/application-shell.js +7 -0
- package/lib/browser/shell/application-shell.js.map +1 -1
- package/lib/browser/shell/sidebar-menu-widget.d.ts +3 -0
- package/lib/browser/shell/sidebar-menu-widget.d.ts.map +1 -1
- package/lib/browser/shell/sidebar-menu-widget.js +15 -1
- package/lib/browser/shell/sidebar-menu-widget.js.map +1 -1
- package/lib/browser/shell/tab-bars.d.ts +4 -1
- package/lib/browser/shell/tab-bars.d.ts.map +1 -1
- package/lib/browser/shell/tab-bars.js +25 -12
- package/lib/browser/shell/tab-bars.js.map +1 -1
- package/lib/browser/status-bar/index.d.ts +0 -1
- package/lib/browser/status-bar/index.d.ts.map +1 -1
- package/lib/browser/status-bar/index.js +0 -3
- package/lib/browser/status-bar/index.js.map +1 -1
- package/lib/browser/status-bar/status-bar.d.ts +3 -3
- package/lib/browser/status-bar/status-bar.d.ts.map +1 -1
- package/lib/browser/status-bar/status-bar.js +10 -6
- package/lib/browser/status-bar/status-bar.js.map +1 -1
- package/lib/browser/view-container.js +1 -1
- package/lib/browser/view-container.js.map +1 -1
- package/lib/common/objects.spec.d.ts +2 -0
- package/lib/common/objects.spec.d.ts.map +1 -0
- package/lib/common/objects.spec.js +102 -0
- package/lib/common/objects.spec.js.map +1 -0
- package/lib/electron-browser/menu/electron-context-menu-renderer.js +2 -2
- package/lib/electron-browser/menu/electron-context-menu-renderer.js.map +1 -1
- package/lib/electron-browser/menu/electron-main-menu-factory.d.ts +8 -2
- package/lib/electron-browser/menu/electron-main-menu-factory.d.ts.map +1 -1
- package/lib/electron-browser/menu/electron-main-menu-factory.js +8 -6
- package/lib/electron-browser/menu/electron-main-menu-factory.js.map +1 -1
- package/lib/electron-main/messaging/electron-messaging-contribution.d.ts +1 -0
- package/lib/electron-main/messaging/electron-messaging-contribution.d.ts.map +1 -1
- package/lib/electron-main/messaging/electron-messaging-contribution.js +6 -2
- package/lib/electron-main/messaging/electron-messaging-contribution.js.map +1 -1
- package/package.json +6 -6
- package/src/browser/context-key-service.ts +29 -9
- package/src/browser/context-menu-renderer.ts +2 -0
- package/src/browser/core-preferences.ts +8 -12
- package/src/browser/frontend-application-module.ts +5 -1
- package/src/browser/hover-service.ts +189 -0
- package/src/browser/icon-theme-service.ts +1 -1
- package/src/browser/index.ts +1 -0
- package/src/browser/menu/browser-context-menu-renderer.ts +2 -2
- package/src/browser/menu/browser-menu-plugin.ts +10 -7
- package/src/browser/resource-context-key.ts +5 -7
- package/src/browser/shell/application-shell.ts +9 -2
- package/src/browser/shell/sidebar-menu-widget.tsx +93 -79
- package/src/browser/shell/tab-bars.ts +29 -6
- package/src/browser/status-bar/index.ts +0 -3
- package/src/browser/status-bar/status-bar.tsx +7 -3
- package/src/browser/style/hover-service.css +95 -0
- package/src/browser/style/status-bar.css +0 -49
- package/src/browser/view-container.ts +1 -1
- package/src/common/i18n/nls.metadata.json +7972 -6673
- package/src/common/objects.spec.ts +112 -0
- package/src/electron-browser/menu/electron-context-menu-renderer.ts +2 -2
- package/src/electron-browser/menu/electron-main-menu-factory.ts +14 -6
- package/src/electron-main/messaging/electron-messaging-contribution.ts +7 -2
- package/lib/browser/status-bar/status-bar-hover-manager.d.ts +0 -25
- package/lib/browser/status-bar/status-bar-hover-manager.d.ts.map +0 -1
- package/lib/browser/status-bar/status-bar-hover-manager.js +0 -126
- package/lib/browser/status-bar/status-bar-hover-manager.js.map +0 -1
- package/src/browser/status-bar/status-bar-hover-manager.ts +0 -113
|
@@ -19,19 +19,20 @@ import * as React from 'react';
|
|
|
19
19
|
import { ReactWidget } from '../widgets';
|
|
20
20
|
import { ContextMenuRenderer } from '../context-menu-renderer';
|
|
21
21
|
import { MenuPath } from '../../common/menu';
|
|
22
|
+
import { HoverService } from '../hover-service';
|
|
22
23
|
|
|
23
24
|
export const SidebarTopMenuWidgetFactory = Symbol('SidebarTopMenuWidgetFactory');
|
|
24
25
|
export const SidebarBottomMenuWidgetFactory = Symbol('SidebarBottomMenuWidgetFactory');
|
|
25
26
|
|
|
26
27
|
export interface SidebarMenu {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
id: string;
|
|
29
|
+
iconClass: string;
|
|
30
|
+
title: string;
|
|
31
|
+
menuPath: MenuPath;
|
|
32
|
+
/*
|
|
33
|
+
* Used to sort menus. The lower the value the lower they are placed in the sidebar.
|
|
34
|
+
*/
|
|
35
|
+
order: number;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
/**
|
|
@@ -39,88 +40,101 @@ export interface SidebarMenu {
|
|
|
39
40
|
*/
|
|
40
41
|
@injectable()
|
|
41
42
|
export class SidebarMenuWidget extends ReactWidget {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
protected readonly menus: SidebarMenu[];
|
|
44
|
+
/**
|
|
45
|
+
* The element that had focus when a menu rendered by this widget was activated.
|
|
46
|
+
*/
|
|
47
|
+
protected preservedContext: HTMLElement | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Flag indicating whether a context menu is open. While a context menu is open, the `preservedContext` should not be cleared.
|
|
50
|
+
*/
|
|
51
|
+
protected preservingContext = false;
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
@inject(ContextMenuRenderer)
|
|
54
|
+
protected readonly contextMenuRenderer: ContextMenuRenderer;
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
this.menus = [];
|
|
58
|
-
}
|
|
56
|
+
@inject(HoverService)
|
|
57
|
+
protected readonly hoverService: HoverService;
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return;
|
|
59
|
+
constructor() {
|
|
60
|
+
super();
|
|
61
|
+
this.menus = [];
|
|
64
62
|
}
|
|
65
|
-
this.menus.push(menu);
|
|
66
|
-
this.menus.sort((a, b) => a.order - b.order);
|
|
67
|
-
this.update();
|
|
68
|
-
}
|
|
69
63
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this.menus.
|
|
64
|
+
addMenu(menu: SidebarMenu): void {
|
|
65
|
+
const exists = this.menus.find(m => m.id === menu.id);
|
|
66
|
+
if (exists) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.menus.push(menu);
|
|
70
|
+
this.menus.sort((a, b) => a.order - b.order);
|
|
76
71
|
this.update();
|
|
77
|
-
}
|
|
78
72
|
}
|
|
79
|
-
}
|
|
80
73
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
74
|
+
removeMenu(menuId: string): void {
|
|
75
|
+
const menu = this.menus.find(m => m.id === menuId);
|
|
76
|
+
if (menu) {
|
|
77
|
+
const index = this.menus.indexOf(menu);
|
|
78
|
+
if (index !== -1) {
|
|
79
|
+
this.menus.splice(index, 1);
|
|
80
|
+
this.update();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
85
83
|
}
|
|
86
|
-
};
|
|
87
84
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
85
|
+
protected readonly onMouseDown = () => {
|
|
86
|
+
const { activeElement } = document;
|
|
87
|
+
if (activeElement instanceof HTMLElement && !this.node.contains(activeElement)) {
|
|
88
|
+
this.preservedContext = activeElement;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
93
91
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
this.contextMenuRenderer.render({
|
|
98
|
-
menuPath,
|
|
99
|
-
includeAnchorArg: false,
|
|
100
|
-
anchor: {
|
|
101
|
-
x: button.left + button.width,
|
|
102
|
-
y: button.top,
|
|
103
|
-
},
|
|
104
|
-
onHide: () => {
|
|
105
|
-
this.preservingContext = false;
|
|
106
|
-
if (this.preservedContext) {
|
|
107
|
-
this.preservedContext.focus({ preventScroll: true });
|
|
108
|
-
this.preservedContext = undefined;
|
|
92
|
+
protected readonly onMouseOut = () => {
|
|
93
|
+
if (!this.preservingContext) {
|
|
94
|
+
this.preservedContext = undefined;
|
|
109
95
|
}
|
|
110
|
-
|
|
111
|
-
});
|
|
112
|
-
}
|
|
96
|
+
};
|
|
113
97
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
98
|
+
protected readonly onMouseEnter = (event: React.MouseEvent<HTMLElement, MouseEvent>, title: string) => {
|
|
99
|
+
if (title && event.nativeEvent.currentTarget) {
|
|
100
|
+
this.hoverService.requestHover({
|
|
101
|
+
content: title,
|
|
102
|
+
target: event.currentTarget,
|
|
103
|
+
position: 'right'
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
protected onClick(e: React.MouseEvent<HTMLElement, MouseEvent>, menuPath: MenuPath): void {
|
|
109
|
+
this.preservingContext = true;
|
|
110
|
+
const button = e.currentTarget.getBoundingClientRect();
|
|
111
|
+
this.contextMenuRenderer.render({
|
|
112
|
+
menuPath,
|
|
113
|
+
includeAnchorArg: false,
|
|
114
|
+
anchor: {
|
|
115
|
+
x: button.left + button.width,
|
|
116
|
+
y: button.top,
|
|
117
|
+
},
|
|
118
|
+
onHide: () => {
|
|
119
|
+
this.preservingContext = false;
|
|
120
|
+
if (this.preservedContext) {
|
|
121
|
+
this.preservedContext.focus({ preventScroll: true });
|
|
122
|
+
this.preservedContext = undefined;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
protected render(): React.ReactNode {
|
|
129
|
+
return <React.Fragment>
|
|
130
|
+
{this.menus.map(menu => <i
|
|
131
|
+
key={menu.id}
|
|
132
|
+
className={menu.iconClass}
|
|
133
|
+
onClick={e => this.onClick(e, menu.menuPath)}
|
|
134
|
+
onMouseDown={this.onMouseDown}
|
|
135
|
+
onMouseEnter={e => this.onMouseEnter(e, menu.title)}
|
|
136
|
+
onMouseLeave={this.onMouseOut}
|
|
137
|
+
/>)}
|
|
138
|
+
</React.Fragment>;
|
|
139
|
+
}
|
|
126
140
|
}
|
|
@@ -33,6 +33,7 @@ import { NavigatableWidget } from '../navigatable-types';
|
|
|
33
33
|
import { IDragEvent } from '@phosphor/dragdrop';
|
|
34
34
|
import { PINNED_CLASS } from '../widgets/widget';
|
|
35
35
|
import { CorePreferences } from '../core-preferences';
|
|
36
|
+
import { HoverService } from '../hover-service';
|
|
36
37
|
|
|
37
38
|
/** The class name added to hidden content nodes, which are required to render vertical side bars. */
|
|
38
39
|
const HIDDEN_CONTENT_CLASS = 'theia-TabBar-hidden-content';
|
|
@@ -90,7 +91,8 @@ export class TabBarRenderer extends TabBar.Renderer {
|
|
|
90
91
|
protected readonly iconThemeService?: IconThemeService,
|
|
91
92
|
protected readonly selectionService?: SelectionService,
|
|
92
93
|
protected readonly commandService?: CommandService,
|
|
93
|
-
protected readonly corePreferences?: CorePreferences
|
|
94
|
+
protected readonly corePreferences?: CorePreferences,
|
|
95
|
+
protected readonly hoverService?: HoverService
|
|
94
96
|
) {
|
|
95
97
|
super();
|
|
96
98
|
if (this.decoratorService) {
|
|
@@ -146,7 +148,7 @@ export class TabBarRenderer extends TabBar.Renderer {
|
|
|
146
148
|
*/
|
|
147
149
|
override renderTab(data: SideBarRenderData, isInSidePanel?: boolean, isPartOfHiddenTabBar?: boolean): VirtualElement {
|
|
148
150
|
const title = data.title;
|
|
149
|
-
const id = this.createTabId(
|
|
151
|
+
const id = this.createTabId(title, isPartOfHiddenTabBar);
|
|
150
152
|
const key = this.createTabKey(data);
|
|
151
153
|
const style = this.createTabStyle(data);
|
|
152
154
|
const className = this.createTabClass(data);
|
|
@@ -154,9 +156,17 @@ export class TabBarRenderer extends TabBar.Renderer {
|
|
|
154
156
|
const closeIconTitle = data.title.className.includes(PINNED_CLASS)
|
|
155
157
|
? nls.localizeByDefault('Unpin')
|
|
156
158
|
: nls.localizeByDefault('Close');
|
|
159
|
+
|
|
160
|
+
const hover = this.tabBar && this.tabBar.orientation === 'horizontal' ? {
|
|
161
|
+
title: title.caption
|
|
162
|
+
} : {
|
|
163
|
+
onmouseenter: this.handleMouseEnterEvent
|
|
164
|
+
};
|
|
165
|
+
|
|
157
166
|
return h.li(
|
|
158
167
|
{
|
|
159
|
-
|
|
168
|
+
...hover,
|
|
169
|
+
key, className, id, style, dataset,
|
|
160
170
|
oncontextmenu: this.handleContextMenuEvent,
|
|
161
171
|
ondblclick: this.handleDblClickEvent,
|
|
162
172
|
onauxclick: (e: MouseEvent) => {
|
|
@@ -457,6 +467,20 @@ export class TabBarRenderer extends TabBar.Renderer {
|
|
|
457
467
|
return h.div({ className: baseClassName, style }, data.title.iconLabel);
|
|
458
468
|
}
|
|
459
469
|
|
|
470
|
+
protected handleMouseEnterEvent = (event: MouseEvent) => {
|
|
471
|
+
if (this.tabBar && this.hoverService && event.currentTarget instanceof HTMLElement) {
|
|
472
|
+
const id = event.currentTarget.id;
|
|
473
|
+
const title = this.tabBar.titles.find(t => this.createTabId(t) === id);
|
|
474
|
+
if (title) {
|
|
475
|
+
this.hoverService.requestHover({
|
|
476
|
+
content: title.caption,
|
|
477
|
+
target: event.currentTarget,
|
|
478
|
+
position: 'right'
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
|
|
460
484
|
protected handleContextMenuEvent = (event: MouseEvent) => {
|
|
461
485
|
if (this.contextMenuRenderer && this.contextMenuPath && event.currentTarget instanceof HTMLElement) {
|
|
462
486
|
event.stopPropagation();
|
|
@@ -501,9 +525,8 @@ export class TabBarRenderer extends TabBar.Renderer {
|
|
|
501
525
|
}
|
|
502
526
|
if (this.tabBar && event.currentTarget instanceof HTMLElement) {
|
|
503
527
|
const id = event.currentTarget.id;
|
|
504
|
-
|
|
505
|
-
const
|
|
506
|
-
const area = title && title.owner.parent;
|
|
528
|
+
const title = this.tabBar.titles.find(t => this.createTabId(t) === id);
|
|
529
|
+
const area = title?.owner.parent;
|
|
507
530
|
if (area instanceof TheiaDockPanel && (area.id === BOTTOM_AREA_ID || area.id === MAIN_AREA_ID)) {
|
|
508
531
|
area.toggleMaximized();
|
|
509
532
|
}
|
|
@@ -16,17 +16,14 @@
|
|
|
16
16
|
|
|
17
17
|
import { interfaces } from 'inversify';
|
|
18
18
|
import { StatusBarImpl } from './status-bar';
|
|
19
|
-
import { StatusBarHoverManager } from './status-bar-hover-manager';
|
|
20
19
|
import { StatusBar } from './status-bar-types';
|
|
21
20
|
import { StatusBarViewModel } from './status-bar-view-model';
|
|
22
21
|
export * from './status-bar';
|
|
23
22
|
export * from './status-bar-types';
|
|
24
23
|
export * from './status-bar-view-model';
|
|
25
|
-
export * from './status-bar-hover-manager';
|
|
26
24
|
|
|
27
25
|
export function bindStatusBar(bind: interfaces.Bind): void {
|
|
28
26
|
bind(StatusBarImpl).toSelf().inSingletonScope();
|
|
29
27
|
bind(StatusBar).to(StatusBarImpl).inSingletonScope();
|
|
30
28
|
bind(StatusBarViewModel).toSelf().inSingletonScope();
|
|
31
|
-
bind(StatusBarHoverManager).toSelf().inSingletonScope();
|
|
32
29
|
}
|
|
@@ -24,7 +24,7 @@ import { LabelParser, LabelIcon } from '../label-parser';
|
|
|
24
24
|
import { PreferenceService } from '../preferences';
|
|
25
25
|
import { StatusBar, StatusBarEntry, StatusBarAlignment, StatusBarViewEntry } from './status-bar-types';
|
|
26
26
|
import { StatusBarViewModel } from './status-bar-view-model';
|
|
27
|
-
import {
|
|
27
|
+
import { HoverService } from '../hover-service';
|
|
28
28
|
import { codicon } from '../widgets';
|
|
29
29
|
export { StatusBar, StatusBarAlignment, StatusBarEntry };
|
|
30
30
|
|
|
@@ -40,7 +40,7 @@ export class StatusBarImpl extends ReactWidget implements StatusBar {
|
|
|
40
40
|
@inject(FrontendApplicationStateService) protected readonly applicationStateService: FrontendApplicationStateService,
|
|
41
41
|
@inject(PreferenceService) protected readonly preferences: PreferenceService,
|
|
42
42
|
@inject(StatusBarViewModel) protected readonly viewModel: StatusBarViewModel,
|
|
43
|
-
@inject(
|
|
43
|
+
@inject(HoverService) protected readonly hoverService: HoverService,
|
|
44
44
|
) {
|
|
45
45
|
super();
|
|
46
46
|
delete this.scrollOptions;
|
|
@@ -136,7 +136,11 @@ export class StatusBarImpl extends ReactWidget implements StatusBar {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
if (entry.tooltip) {
|
|
139
|
-
attrs.onMouseEnter = e => this.
|
|
139
|
+
attrs.onMouseEnter = e => this.hoverService.requestHover({
|
|
140
|
+
content: entry.tooltip!,
|
|
141
|
+
target: e.currentTarget,
|
|
142
|
+
position: 'top'
|
|
143
|
+
});
|
|
140
144
|
}
|
|
141
145
|
if (entry.className) {
|
|
142
146
|
attrs.className += ' ' + entry.className;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (C) 2022 TypeFox 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 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
|
|
17
|
+
/* Adapted from https://github.com/microsoft/vscode/blob/7d9b1c37f8e5ae3772782ba3b09d827eb3fdd833/src/vs/workbench/services/hover/browser/hoverService.ts */
|
|
18
|
+
|
|
19
|
+
:root {
|
|
20
|
+
--theia-hover-max-width: 500px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.theia-hover {
|
|
24
|
+
font-family: var(--theia-ui-font-family);
|
|
25
|
+
font-size: var(--theia-ui-font-size1);
|
|
26
|
+
color: var(--theia-editorHoverWidget-foreground);
|
|
27
|
+
background-color: var(--theia-editorHoverWidget-background);
|
|
28
|
+
border: 1px solid var(--theia-editorHoverWidget-border);
|
|
29
|
+
padding: var(--theia-ui-padding);
|
|
30
|
+
max-width: var(--theia-hover-max-width);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.theia-hover .hover-row:not(:first-child):not(:empty) {
|
|
34
|
+
border-top: 1px solid var(--theia-editorHoverWidgetInternalBorder);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.theia-hover hr {
|
|
38
|
+
border-top: 1px solid var(--theia-editorHoverWidgetInternalBorder);
|
|
39
|
+
border-bottom: 0px solid var(--theia-editorHoverWidgetInternalBorder);
|
|
40
|
+
margin: var(--theia-ui-padding) calc(var(--theia-ui-padding) * -1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.theia-hover a {
|
|
44
|
+
color: var(--theia-textLink-foreground);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.theia-hover a:hover {
|
|
48
|
+
color: var(--theia-textLink-active-foreground);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.theia-hover .hover-row .actions {
|
|
52
|
+
background-color: var(--theia-editorHoverWidget-statusBarBackground);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.theia-hover code {
|
|
56
|
+
background-color: var(--theia-textCodeBlock-background);
|
|
57
|
+
font-family: var(--theia-code-font-family);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.theia-hover::before {
|
|
61
|
+
content: '';
|
|
62
|
+
position: absolute;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.theia-hover.top::before {
|
|
66
|
+
left: var(--theia-hover-before-position);
|
|
67
|
+
bottom: -5px;
|
|
68
|
+
border-top: 5px solid var(--theia-editorHoverWidget-border);
|
|
69
|
+
border-left: 5px solid transparent;
|
|
70
|
+
border-right: 5px solid transparent;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.theia-hover.bottom::before {
|
|
74
|
+
left: var(--theia-hover-before-position);
|
|
75
|
+
top: -5px;
|
|
76
|
+
border-bottom: 5px solid var(--theia-editorHoverWidget-border);
|
|
77
|
+
border-left: 5px solid transparent;
|
|
78
|
+
border-right: 5px solid transparent;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.theia-hover.left::before {
|
|
82
|
+
top: var(--theia-hover-before-position);
|
|
83
|
+
right: -5px;
|
|
84
|
+
border-left: 5px solid var(--theia-editorHoverWidget-border);
|
|
85
|
+
border-top: 5px solid transparent;
|
|
86
|
+
border-bottom: 5px solid transparent;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.theia-hover.right::before {
|
|
90
|
+
top: var(--theia-hover-before-position);
|
|
91
|
+
left: -5px;
|
|
92
|
+
border-right: 5px solid var(--theia-editorHoverWidget-border);
|
|
93
|
+
border-top: 5px solid transparent;
|
|
94
|
+
border-bottom: 5px solid transparent;
|
|
95
|
+
}
|
|
@@ -116,52 +116,3 @@ body.theia-no-open-workspace #theia-statusBar {
|
|
|
116
116
|
-webkit-font-smoothing: antialiased;
|
|
117
117
|
-moz-osx-font-smoothing: grayscale;
|
|
118
118
|
}
|
|
119
|
-
|
|
120
|
-
/* Adapted from https://github.com/microsoft/vscode/blob/7d9b1c37f8e5ae3772782ba3b09d827eb3fdd833/src/vs/workbench/services/hover/browser/hoverService.ts */
|
|
121
|
-
|
|
122
|
-
.theia-status-bar-hover {
|
|
123
|
-
font-family: var(--theia-ui-font-family);
|
|
124
|
-
font-size: var(--theia-ui-font-size1);
|
|
125
|
-
color: var(--theia-editorHoverWidget-foreground);
|
|
126
|
-
background-color: var(--theia-editorHoverWidget-background);
|
|
127
|
-
border: 1px solid var(--theia-editorHoverWidget-border);
|
|
128
|
-
padding: var(--theia-ui-padding);
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.theia-status-bar-hover .hover-row:not(:first-child):not(:empty) {
|
|
133
|
-
border-top: 1px solid var(--theia-editorHoverWidgetInternalBorder);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.theia-status-bar-hover hr {
|
|
137
|
-
border-top: 1px solid var(--theia-editorHoverWidgetInternalBorder);
|
|
138
|
-
border-bottom: 0px solid var(--theia-editorHoverWidgetInternalBorder);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.theia-status-bar-hover a {
|
|
142
|
-
color: var(--theia-textLink-foreground);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.theia-status-bar-hover a:hover {
|
|
146
|
-
color: var(--theia-textLink-active-foreground);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.theia-status-bar-hover .hover-row .actions {
|
|
150
|
-
background-color: var(--theia-editorHoverWidget-statusBarBackground);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.theia-status-bar-hover code {
|
|
154
|
-
background-color: var(--theia-textCodeBlock-background);
|
|
155
|
-
font-family: var(--theia-code-font-family);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.theia-status-bar-hover::before {
|
|
159
|
-
content: '';
|
|
160
|
-
position: absolute;
|
|
161
|
-
/* Set by the StatusBarHoverManager */
|
|
162
|
-
left: var(--theia-status-bar-hover-before-left);
|
|
163
|
-
bottom: -5px;
|
|
164
|
-
border-top: 5px solid var(--theia-editorHoverWidget-border);
|
|
165
|
-
border-left: 5px solid transparent;
|
|
166
|
-
border-right: 5px solid transparent;
|
|
167
|
-
}
|
|
@@ -175,7 +175,7 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica
|
|
|
175
175
|
}),
|
|
176
176
|
menuRegistry.registerMenuAction([...this.contextMenuPath, '0_global'], {
|
|
177
177
|
commandId: this.globalHideCommandId,
|
|
178
|
-
label: nls.
|
|
178
|
+
label: nls.localizeByDefault('Hide')
|
|
179
179
|
}),
|
|
180
180
|
this.onDidChangeTrackableWidgetsEmitter,
|
|
181
181
|
this.onDidChangeTrackableWidgets(() => this.decoratorService.fireDidChangeDecorations())
|