From 5097ca9bd7eeab2df5f31686a061ef3281933c16 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Sat, 23 Aug 2014 19:19:09 +0400 Subject: [PATCH] [push] shorten subject with ... if it is very long & make it larger --- .../com/intellij/dvcs/push/ui/VcsFullCommitDetailsNode.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/VcsFullCommitDetailsNode.java b/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/VcsFullCommitDetailsNode.java index 0df7af05d496..cea40cc54cd6 100644 --- a/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/VcsFullCommitDetailsNode.java +++ b/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/VcsFullCommitDetailsNode.java @@ -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() {