[push] shorten subject with ... if it is very long & make it larger

This commit is contained in:
Kirill Likhodedov
2014-08-28 16:10:00 +04:00
parent 9cfe20df62
commit 5097ca9bd7
@@ -17,6 +17,7 @@ package com.intellij.dvcs.push.ui;
import com.intellij.dvcs.DvcsUtil;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vcs.changes.issueLinks.IssueLinkHtmlRenderer;
import com.intellij.ui.ColoredTreeCellRenderer;
import com.intellij.ui.SimpleTextAttributes;
@@ -38,8 +39,8 @@ public class VcsFullCommitDetailsNode extends DefaultMutableTreeNode implements
@Override
public void render(@NotNull ColoredTreeCellRenderer renderer) {
renderer
.append(myCommit.getSubject(), new SimpleTextAttributes(SimpleTextAttributes.STYLE_SMALLER, renderer.getForeground()));
String subject = StringUtil.shortenTextWithEllipsis(myCommit.getSubject(), 80, 0);
renderer.append(subject, new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, renderer.getForeground()));
}
public String getTooltip() {