Skip to content

Commit 475b674

Browse files
Eric Amodioeamodio
Eric Amodio
authored andcommitted
Closes #106683 - adds view title tooltips
1 parent 0012b4c commit 475b674

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/vs/workbench/browser/parts/views/viewPaneContainer.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export abstract class ViewPane extends Pane implements IView {
365365
}
366366

367367
const calculatedTitle = this.calculateTitle(title);
368-
this.titleContainer = append(container, $('h3.title', undefined, calculatedTitle));
368+
this.titleContainer = append(container, $('h3.title', { title: calculatedTitle }, calculatedTitle));
369369

370370
if (this._titleDescription) {
371371
this.setTitleDescription(this._titleDescription);
@@ -379,6 +379,7 @@ export abstract class ViewPane extends Pane implements IView {
379379
const calculatedTitle = this.calculateTitle(title);
380380
if (this.titleContainer) {
381381
this.titleContainer.textContent = calculatedTitle;
382+
this.titleContainer.setAttribute('title', calculatedTitle);
382383
}
383384

384385
if (this.iconContainer) {
@@ -393,9 +394,10 @@ export abstract class ViewPane extends Pane implements IView {
393394
private setTitleDescription(description: string | undefined) {
394395
if (this.titleDescriptionContainer) {
395396
this.titleDescriptionContainer.textContent = description ?? '';
397+
this.titleDescriptionContainer.setAttribute('title', description ?? '');
396398
}
397399
else if (description && this.titleContainer) {
398-
this.titleDescriptionContainer = after(this.titleContainer, $('span.description', undefined, description));
400+
this.titleDescriptionContainer = after(this.titleContainer, $('span.description', { title: description }, description));
399401
}
400402
}
401403

0 commit comments

Comments
 (0)