Skip to content

Commit 60af1d3

Browse files
allow hover of detail. Fixes microsoft#101874
1 parent e5bcb02 commit 60af1d3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/vs/base/parts/quickinput/browser/quickInputList.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import * as dom from 'vs/base/browser/dom';
77
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
88
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
9-
import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
109
import { IconLabel, IIconLabelValueOptions } from 'vs/base/browser/ui/iconLabel/iconLabel';
1110
import { KeybindingLabel } from 'vs/base/browser/ui/keybindingLabel/keybindingLabel';
1211
import { IListRenderer, IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
@@ -88,7 +87,7 @@ interface IListElementTemplateData {
8887
checkbox: HTMLInputElement;
8988
label: IconLabel;
9089
keybinding: KeybindingLabel;
91-
detail: HighlightedLabel;
90+
detail: IconLabel;
9291
separator: HTMLDivElement;
9392
actionBar: ActionBar;
9493
element: ListElement;
@@ -138,7 +137,7 @@ class ListElementRenderer implements IListRenderer<ListElement, IListElementTemp
138137

139138
// Detail
140139
const detailContainer = dom.append(row2, $('.quick-input-list-label-meta'));
141-
data.detail = new HighlightedLabel(detailContainer, true);
140+
data.detail = new IconLabel(detailContainer, { supportHighlights: true, supportIcons: true });
142141

143142
// Separator
144143
data.separator = dom.append(data.entry, $('.quick-input-list-separator'));
@@ -173,7 +172,12 @@ class ListElementRenderer implements IListRenderer<ListElement, IListElementTemp
173172
data.keybinding.set(element.item.keybinding);
174173

175174
// Meta
176-
data.detail.set(element.saneDetail, detailHighlights);
175+
if (element.saneDetail) {
176+
data.detail.setLabel(element.saneDetail, undefined, {
177+
matches: detailHighlights,
178+
title: element.saneDetail
179+
});
180+
}
177181

178182
// Separator
179183
if (element.separator && element.separator.label) {

0 commit comments

Comments
 (0)