Error message in details panel can be huge

This commit is contained in:
Maxim Shafirov
2012-03-12 21:43:57 +04:00
parent da8dc073d5
commit ec17f5b74e
2 changed files with 3 additions and 1 deletions
@@ -15,6 +15,7 @@
*/
package com.intellij.vcsUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.ui.SimpleTextAttributes;
import com.intellij.util.ui.UIUtil;
@@ -31,7 +32,7 @@ public class UIVcsUtil {
}
public static JPanel errorPanel(final String text, boolean isError) {
final JLabel label = new JLabel(text);
final JLabel label = new JLabel("<html><body>" + StringUtil.escapeXml(text) + "</body></html>");
label.setForeground(isError ? SimpleTextAttributes.ERROR_ATTRIBUTES.getFgColor() : UIUtil.getInactiveTextColor());
final JPanel wrapper = new JPanel(new GridBagLayout());
wrapper.add(label, new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.CENTER, GridBagConstraints.NONE,
@@ -280,6 +280,7 @@ public class ChangesViewManager implements ChangesViewI, JDOMExternalizable, Pro
final JPanel content = new JPanel(new BorderLayout());
mySplitter = new Splitter(false, 0.5f);
mySplitter.setHonorComponentsMinimumSize(false);
final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myView);
final JPanel wrapper = new JPanel(new BorderLayout());
wrapper.add(scrollPane, BorderLayout.CENTER);