fix unfocused foreground on Nimbus

This commit is contained in:
Konstantin Bulenkov
2012-07-26 18:12:25 +02:00
parent edaff474e8
commit 07d0bc1eaa
3 changed files with 6 additions and 6 deletions
@@ -142,7 +142,7 @@ public abstract class ColoredTreeCellRenderer extends SimpleColoredComponent imp
* It guaranties readability of selected text in any LAF.
*/
public void append(@NotNull @Nls String fragment, @NotNull SimpleTextAttributes attributes, boolean isMainText) {
if (mySelected && (myFocused || UIUtil.isUnderNimbusLookAndFeel())) {
if (mySelected && myFocused) {
super.append(fragment, new SimpleTextAttributes(attributes.getStyle(), UIUtil.getTreeSelectionForeground()), isMainText);
}
else if (mySelected && UIUtil.isUnderAquaBasedLookAndFeel()) {
@@ -947,7 +947,7 @@ public class UIUtil {
}
public static boolean isFullRowSelectionLAF() {
return isUnderNimbusLookAndFeel() || isUnderQuaquaLookAndFeel();
return isUnderQuaquaLookAndFeel();
}
public static boolean isUnderNativeMacLookAndFeel() {
@@ -42,10 +42,10 @@ public class WideSelectionTreeUI extends BasicTreeUI {
private static final Icon TREE_COLLAPSED_ICON = UIUtil.getTreeCollapsedIcon();
private static final Icon TREE_EXPANDED_ICON = UIUtil.getTreeExpandedIcon();
private static final Icon TREE_SELECTED_COLLAPSED_ICON = UIUtil.isUnderAquaBasedLookAndFeel() ? AllIcons.Mac.Tree_white_right_arrow
: TREE_COLLAPSED_ICON;
private static final Icon TREE_SELECTED_EXPANDED_ICON = UIUtil.isUnderAquaBasedLookAndFeel() ? AllIcons.Mac.Tree_white_down_arrow
: TREE_EXPANDED_ICON;
private static final Icon TREE_SELECTED_COLLAPSED_ICON = UIUtil.isUnderAquaBasedLookAndFeel() || UIUtil.isUnderNimbusLookAndFeel()
? AllIcons.Mac.Tree_white_right_arrow : TREE_COLLAPSED_ICON;
private static final Icon TREE_SELECTED_EXPANDED_ICON = UIUtil.isUnderAquaBasedLookAndFeel() || UIUtil.isUnderNimbusLookAndFeel()
? AllIcons.Mac.Tree_white_down_arrow : TREE_EXPANDED_ICON;
private static final Border LIST_BACKGROUND_PAINTER = (Border)UIManager.get("List.sourceListBackgroundPainter");
private static final Border LIST_SELECTION_BACKGROUND_PAINTER = (Border)UIManager.get("List.sourceListSelectionBackgroundPainter");