@@ -11,6 +11,7 @@ import { Disposable } from '../../../../base/common/lifecycle.js';
11
11
import type { ThemeIcon } from '../../../../base/common/themables.js' ;
12
12
import { IHoverService } from '../../../../platform/hover/browser/hover.js' ;
13
13
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js' ;
14
+ import { ILayoutService } from '../../../../platform/layout/browser/layoutService.js' ;
14
15
import { defaultInputBoxStyles } from '../../../../platform/theme/browser/defaultStyles.js' ;
15
16
import { getIconRegistry , IconContribution } from '../../../../platform/theme/common/iconRegistry.js' ;
16
17
import { WorkbenchIconSelectBox } from '../../../services/userDataProfile/browser/iconSelectBox.js' ;
@@ -39,14 +40,14 @@ export class TerminalIconPicker extends Disposable {
39
40
40
41
constructor (
41
42
@IInstantiationService instantiationService : IInstantiationService ,
42
- @IHoverService private readonly _hoverService : IHoverService
43
+ @IHoverService private readonly _hoverService : IHoverService ,
44
+ @ILayoutService private readonly _layoutService : ILayoutService ,
43
45
) {
44
46
super ( ) ;
45
47
46
48
this . _iconSelectBox = instantiationService . createInstance ( WorkbenchIconSelectBox , {
47
49
icons : icons . value ,
48
- inputBoxStyles : defaultInputBoxStyles ,
49
- showIconInfo : true
50
+ inputBoxStyles : defaultInputBoxStyles
50
51
} ) ;
51
52
}
52
53
@@ -58,18 +59,21 @@ export class TerminalIconPicker extends Disposable {
58
59
this . _iconSelectBox . dispose ( ) ;
59
60
} ) ) ;
60
61
this . _iconSelectBox . clearInput ( ) ;
62
+ const body = getActiveDocument ( ) . body ;
63
+ const bodyRect = body . getBoundingClientRect ( ) ;
61
64
const hoverWidget = this . _hoverService . showInstantHover ( {
62
65
content : this . _iconSelectBox . domNode ,
63
- target : getActiveDocument ( ) . body ,
66
+ target : {
67
+ targetElements : [ body ] ,
68
+ x : bodyRect . left + ( bodyRect . width - dimension . width ) / 2 ,
69
+ y : bodyRect . top + this . _layoutService . activeContainerOffset . quickPickTop - 2
70
+ } ,
64
71
position : {
65
72
hoverPosition : HoverPosition . BELOW ,
66
73
} ,
67
74
persistence : {
68
75
sticky : true ,
69
76
} ,
70
- appearance : {
71
- showPointer : true
72
- }
73
77
} , true ) ;
74
78
if ( hoverWidget ) {
75
79
this . _register ( hoverWidget ) ;
0 commit comments