IDEA-95904 Darcula parameter info pop-up colors hard to read

This commit is contained in:
Konstantin Bulenkov
2013-08-20 09:48:35 +02:00
parent d0fed4ff04
commit 12ffe7c584
@@ -47,7 +47,6 @@ class ParameterInfoComponent extends JPanel {
private final OneElementComponent[] myPanels;
private static final Color BACKGROUND_COLOR = HintUtil.INFORMATION_COLOR;
private static final Color FOREGROUND_COLOR = JBColor.foreground();
private static final Color HIGHLIGHTED_BORDER_COLOR = new JBColor(new Color(231, 254, 234), Gray._100);
private final Font NORMAL_FONT;
private final Font BOLD_FONT;
@@ -338,7 +337,7 @@ class ParameterInfoComponent extends JPanel {
myLabel.setBackground(background);
setBackground(background);
myLabel.setForeground(FOREGROUND_COLOR);
myLabel.setForeground(JBColor.foreground());
if (flagsMap.isEmpty()) {
myLabel.setText(XmlStringUtil.wrapInHtml(XmlStringUtil.escapeString(text)));
@@ -347,6 +346,11 @@ class ParameterInfoComponent extends JPanel {
String labelText = buildLabelText(text, flagsMap);
myLabel.setText(labelText);
}
//IDEA-95904 Darcula parameter info pop-up colors hard to read
if (UIUtil.isUnderDarcula()) {
myLabel.setText(myLabel.getText().replace("<b>", "<b color=ffC800>"));
}
}
private String buildLabelText(@NotNull final String text, @NotNull final Map<TextRange, ParameterInfoUIContextEx.Flag> flagsMap) {
final StringBuilder labelText = new StringBuilder(text);