Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/vs
diff options
context:
space:
mode:
authorSteVen Batten <6561887+sbatten@users.noreply.github.com>2022-07-28 22:45:48 +0300
committerGitHub <noreply@github.com>2022-07-28 22:45:48 +0300
commit0e2e0e2833b55469a585ccd4854748c5c7860971 (patch)
treef181e822f81095b925c9b6d81dabff5553521580 /src/vs
parent0a65bea3573d503c3078eff3e4b7f26f138e967d (diff)
add tooltip tech to dropdown buttons (#156621)
fixes #153429
Diffstat (limited to 'src/vs')
-rw-r--r--src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts b/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts
index 0af76e3b6a0..00b21774ea0 100644
--- a/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts
+++ b/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts
@@ -126,9 +126,22 @@ export class DropdownMenuActionViewItem extends BaseActionViewItem {
};
}
+ this.updateTooltip();
this.updateEnabled();
}
+ override getTooltip(): string | undefined {
+ let title: string | null = null;
+
+ if (this.getAction().tooltip) {
+ title = this.getAction().tooltip;
+ } else if (this.getAction().label) {
+ title = this.getAction().label;
+ }
+
+ return title ?? undefined;
+ }
+
override setActionContext(newContext: unknown): void {
super.setActionContext(newContext);