Refactor hover delegate assignments (#205366)

💄
This commit is contained in:
Benjamin Christopher Simmonds 2024-02-16 14:54:39 +01:00 committed by GitHub
parent d9ef55ae9e
commit 3fdb0fa6e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 3 additions and 4 deletions

View file

@ -226,7 +226,6 @@ export class BaseActionViewItem extends Disposable implements IActionViewItem {
const title = this.getTooltip() ?? '';
this.updateAriaLabel();
this.element.title = '';
if (!this.customHover) {
const hoverDelegate = this.options.hoverDelegate ?? getDefaultHoverDelegate('element');
this.customHover = setupCustomHover(hoverDelegate, this.element, title);

View file

@ -90,7 +90,7 @@ export class QuickInputService extends Themable implements IQuickInputService {
options: IWorkbenchListOptions<T>
) => this.instantiationService.createInstance(WorkbenchList, user, container, delegate, renderers, options) as List<T>,
styles: this.computeStyles(),
hoverDelegate: this.instantiationService.createInstance(QuickInputHoverDelegate)
hoverDelegate: this._register(this.instantiationService.createInstance(QuickInputHoverDelegate))
};
const controller = this._register(new QuickInputController({

View file

@ -355,7 +355,7 @@ class ActionBarRenderer extends Disposable implements ITableRenderer<ActionBarCe
) {
super();
this._hoverDelegate = getDefaultHoverDelegate('mouse', true);
this._hoverDelegate = this._register(getDefaultHoverDelegate('mouse', true));
}
set actionRunner(actionRunner: ActionRunner) {

View file

@ -1149,7 +1149,7 @@ class TimelineTreeRenderer implements ITreeRenderer<TreeElement, FuzzyScore, Tim
@IThemeService private themeService: IThemeService,
) {
this.actionViewItemProvider = createActionViewItem.bind(undefined, this.instantiationService);
this._hoverDelegate = getDefaultHoverDelegate('element');
this._hoverDelegate = getDefaultHoverDelegate('mouse');
}
private uri: URI | undefined;