Skip to content

Commit 0e2e0e2

Browse files
authored
add tooltip tech to dropdown buttons (microsoft#156621)
fixes microsoft#153429
1 parent 0a65bea commit 0e2e0e2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,22 @@ export class DropdownMenuActionViewItem extends BaseActionViewItem {
126126
};
127127
}
128128

129+
this.updateTooltip();
129130
this.updateEnabled();
130131
}
131132

133+
override getTooltip(): string | undefined {
134+
let title: string | null = null;
135+
136+
if (this.getAction().tooltip) {
137+
title = this.getAction().tooltip;
138+
} else if (this.getAction().label) {
139+
title = this.getAction().label;
140+
}
141+
142+
return title ?? undefined;
143+
}
144+
132145
override setActionContext(newContext: unknown): void {
133146
super.setActionContext(newContext);
134147

0 commit comments

Comments
 (0)