mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
problems with file colors and bg painting
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2010 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,6 +40,7 @@ public class NonProjectFilesScope extends NamedScope {
|
||||
super(NAME, new AbstractPackageSet("NonProject") {
|
||||
public boolean contains(VirtualFile file, NamedScopesHolder holder) {
|
||||
if (file == null) return true;
|
||||
if (file.getFileSystem() != LocalFileSystem.getInstance()) return true;
|
||||
if (isInsideProjectContent(holder.getProject(), file)) return false;
|
||||
return !ProjectScope.getProjectScope(holder.getProject()).contains(file);
|
||||
}
|
||||
|
||||
@@ -64,9 +64,11 @@ public abstract class ColoredTreeCellRenderer extends SimpleColoredComponent imp
|
||||
if (UIUtil.isFullRowSelectionLAF()) {
|
||||
setBackground(selected ? UIUtil.getTreeSelectionBackground() : null);
|
||||
}
|
||||
else if (/*UIUtil.isUnderAquaBasedLookAndFeel() && */tree.getUI() instanceof WideSelectionTreeUI && ((WideSelectionTreeUI)tree.getUI()).isWideSelection()) {
|
||||
else if (tree.getUI() instanceof WideSelectionTreeUI && ((WideSelectionTreeUI)tree.getUI()).isWideSelection()) {
|
||||
setPaintFocusBorder(false);
|
||||
//setBackground(selected ? UIUtil.getTreeSelectionBackground() : null);
|
||||
if (selected) {
|
||||
setBackground(hasFocus ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeUnfocusedSelectionBackground());
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (selected) {
|
||||
|
||||
@@ -34,8 +34,9 @@ public class ColorUtil {
|
||||
}
|
||||
|
||||
public static Color softer(@NotNull Color color) {
|
||||
if (color.getBlue() > 220 && color.getRed() > 220 && color.getGreen() > 220) return color;
|
||||
final float[] hsb = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null);
|
||||
return Color.getHSBColor(hsb[0], 0.4f *hsb[1], hsb[2]);
|
||||
return Color.getHSBColor(hsb[0], 0.6f *hsb[1], hsb[2]);
|
||||
}
|
||||
|
||||
private static int shift(int colorComponent, double d) {
|
||||
|
||||
@@ -947,7 +947,7 @@ public class UIUtil {
|
||||
}
|
||||
|
||||
public static boolean isFullRowSelectionLAF() {
|
||||
return isUnderNimbusLookAndFeel() || isUnderQuaquaLookAndFeel() || isUnderDarcula();
|
||||
return isUnderNimbusLookAndFeel() || isUnderQuaquaLookAndFeel();
|
||||
}
|
||||
|
||||
public static boolean isUnderNativeMacLookAndFeel() {
|
||||
|
||||
Reference in New Issue
Block a user