IDEA-198843 Add keys: secondary grey text in List

This commit is contained in:
Kirill Kirichenko
2018-10-25 15:51:24 +03:00
parent 8be385c422
commit 6452d8b2f7
9 changed files with 17 additions and 15 deletions
@@ -1181,7 +1181,7 @@ public class SearchEverywhereUI extends BigPopupUI implements DataProvider, Quic
private static JLabel groupInfoLabel(String text) {
JLabel label = new JLabel(text);
label.setForeground(UIUtil.getLabelDisabledForeground());
label.setForeground(JBUI.CurrentTheme.BigPopup.listTitleLabelForeground());
label.setFont(UIUtil.getLabelFont().deriveFont(UIUtil.getFontSize(UIUtil.FontSize.SMALL)));
label.setOpaque(false);
return label;
@@ -165,9 +165,9 @@ public abstract class PsiElementListCellRenderer<T extends PsiElement> extends J
}
private void appendLocationText(boolean selected, Color bgColor, boolean isProblemFile, String containerText) {
SimpleTextAttributes locationAttrs = new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, JBColor.GRAY);
SimpleTextAttributes locationAttrs = SimpleTextAttributes.GRAYED_ATTRIBUTES;
if (isProblemFile) {
SimpleTextAttributes wavedAttributes = SimpleTextAttributes.merge(new SimpleTextAttributes(SimpleTextAttributes.STYLE_WAVED, JBColor.GRAY, JBColor.RED), locationAttrs);
SimpleTextAttributes wavedAttributes = SimpleTextAttributes.merge(new SimpleTextAttributes(SimpleTextAttributes.STYLE_WAVED, UIUtil.getInactiveTextColor(), JBColor.RED), locationAttrs);
java.util.regex.Matcher matcher = CONTAINER_PATTERN.matcher(containerText);
if (matcher.matches()) {
String prefix = matcher.group(1);
@@ -711,7 +711,7 @@ public class GotoActionModel implements ChooseByNameModel, Comparator<Object>, D
return panel;
}
Color groupFg = isSelected ? UIUtil.getListSelectionForeground() : UIUtil.getLabelDisabledForeground();
Color groupFg = isSelected ? UIUtil.getListSelectionForeground() : UIUtil.getInactiveTextColor();
Object value = ((MatchedValue) matchedValue).value;
String pattern = ((MatchedValue)matchedValue).pattern;
@@ -759,8 +759,7 @@ public class GotoActionModel implements ChooseByNameModel, Comparator<Object>, D
appendWithColoredMatches(nameComponent, name, pattern, fg, isSelected);
if (StringUtil.isNotEmpty(shortcutText)) {
nameComponent.append(" " + shortcutText,
new SimpleTextAttributes(SimpleTextAttributes.STYLE_SMALLER | SimpleTextAttributes.STYLE_BOLD,
UIUtil.isUnderDarcula() ? groupFg : ColorUtil.shift(groupFg, 1.3)));
new SimpleTextAttributes(SimpleTextAttributes.STYLE_SMALLER | SimpleTextAttributes.STYLE_BOLD, groupFg));
}
}
else if (value instanceof OptionDescription) {
@@ -270,7 +270,7 @@ SearchEverywhere.Tab.active.background=555a5e
SearchEverywhere.Tab.active.foreground=bbbbbb
SearchEverywhere.SearchField.background=3c3f41
SearchEverywhere.SearchField.borderColor=646464
SearchEverywhere.List.Separator.Color=505050
SearchEverywhere.List.separatorColor=505050
SearchEverywhere.SearchField.grayForeground=808080
SearchEverywhere.Advertiser.foreground=808080
SearchEverywhere.Advertiser.background=45494a
@@ -251,7 +251,7 @@ SearchEverywhere.Tab.active.background=dedede
SearchEverywhere.Tab.active.foreground=000000
SearchEverywhere.SearchField.background=ffffff
SearchEverywhere.SearchField.borderColor=bdbdbd
SearchEverywhere.List.Separator.Color=dcdcdc
SearchEverywhere.List.separatorColor=dcdcdc
SearchEverywhere.SearchField.grayForeground=808080
SearchEverywhere.Advertiser.foreground=808080
SearchEverywhere.Advertiser.background=f2f2f2
@@ -261,7 +261,7 @@ SearchEverywhere.Tab.active.background=dedede
SearchEverywhere.Tab.active.foreground=000000
SearchEverywhere.SearchField.background=ffffff
SearchEverywhere.SearchField.borderColor=bdbdbd
SearchEverywhere.List.Separator.Color=dcdcdc
SearchEverywhere.List.separatorColor=dcdcdc
SearchEverywhere.SearchField.grayForeground=808080
SearchEverywhere.Advertiser.foreground=808080
SearchEverywhere.Advertiser.background=f2f2f2
@@ -1803,7 +1803,11 @@ public class JBUI {
}
public static Color listSeparatorColor() {
return JBColor.namedColor("SearchEverywhere.List.Separator.Color", 0xdcdcdc);
return JBColor.namedColor("SearchEverywhere.List.separatorColor", Gray.xDC);
}
public static Color listTitleLabelForeground() {
return JBColor.namedColor("SearchEverywhere.List.Separator.foreground", UIUtil.getLabelDisabledForeground());
}
public static Color searchFieldGrayForeground() {
@@ -1106,9 +1106,7 @@ public class UIUtil {
}
public static Color getLabelDisabledForeground() {
final Color color = UIManager.getColor("Label.disabledForeground");
if (color != null) return color;
return UIManager.getColor("Label.disabledText");
return JBColor.namedColor("Label.disabledForeground", JBColor.GRAY);
}
public static Color getContextHelpForeground() {
@@ -684,7 +684,7 @@ public final class UiDefaultsHardcodedKeys {
"ScrollPane.foreground",
"ScrollPaneUI",
"SearchEverywhere.Header.background",
"SearchEverywhere.List.Separator.Color",
"SearchEverywhere.List.separatorColor",
"SearchEverywhere.SearchField.borderColor",
"SearchEverywhere.SearchField.background",
"SearchEverywhere.Tab.active.background",
@@ -1313,7 +1313,8 @@ public final class UiDefaultsHardcodedKeys {
"SearchEverywhere.Advertiser.background",
"SearchEverywhere.Advertiser.foreground",
"SearchEverywhere.Header.background",
"SearchEverywhere.List.Separator.Color",
"SearchEverywhere.List.separatorColor",
"SearchEverywhere.List.Separator.foreground",
"SearchEverywhere.SearchField.background",
"SearchEverywhere.SearchField.borderColor",
"SearchEverywhere.SearchField.grayForeground",