From 80098fdb74cab3c754057d4b17cb5b0cbc22a695 Mon Sep 17 00:00:00 2001 From: Vincent Fugnitto Date: Thu, 21 Mar 2019 07:41:44 -0400 Subject: [PATCH] Add missing git diff caption Fixes #4639 Currently, the `git-diff-widget` does not have a caption (tooltip). This means that when the widget is docked, and it's icon is displayed, no tooltip is shown when hovering while others widget do include it. For the sake of completeness and consistency, the `git-diff-widget` should include a caption. Signed-off-by: Vincent Fugnitto --- packages/git/src/browser/diff/git-diff-widget.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/git/src/browser/diff/git-diff-widget.tsx b/packages/git/src/browser/diff/git-diff-widget.tsx index dd8289e293568..a8efabdf8e282 100644 --- a/packages/git/src/browser/diff/git-diff-widget.tsx +++ b/packages/git/src/browser/diff/git-diff-widget.tsx @@ -32,6 +32,8 @@ export const GIT_DIFF = 'git-diff'; @injectable() export class GitDiffWidget extends GitNavigableListWidget implements StatefulWidget { + protected readonly GIT_DIFF_TITLE = 'Diff'; + protected fileChangeNodes: GitFileChangeNode[] = []; protected options: Git.Options.Diff; @@ -48,7 +50,9 @@ export class GitDiffWidget extends GitNavigableListWidget imp super(); this.id = GIT_DIFF; this.scrollContainer = 'git-diff-list-container'; - this.title.label = 'Diff'; + this.title.label = this.GIT_DIFF_TITLE; + this.title.caption = this.GIT_DIFF_TITLE; + this.title.iconClass = 'theia-git-diff-icon'; this.addClass('theia-git');