mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
gray onfocused lookup
This commit is contained in:
@@ -30,6 +30,7 @@ import com.intellij.ui.SimpleColoredComponent;
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
import com.intellij.ui.popup.PopupIcons;
|
||||
import com.intellij.util.ui.EmptyIcon;
|
||||
import com.intellij.util.ui.SameColor;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -153,7 +154,13 @@ public class LookupCellRenderer implements ListCellRenderer {
|
||||
|
||||
private Color getItemBackground(JList list, int index, boolean isSelected) {
|
||||
final int preferredCount = myLookup.getPreferredItemsCount();
|
||||
if (index <= preferredCount - 1 && preferredCount < list.getModel().getSize() - 1) {
|
||||
final boolean isPreferred = index <= preferredCount - 1 && preferredCount < list.getModel().getSize() - 1;
|
||||
|
||||
if (!myLookup.isFocused()) {
|
||||
return new SameColor(239);
|
||||
}
|
||||
|
||||
if (isPreferred) {
|
||||
return isSelected ? SELECTED_BACKGROUND_COLOR : PREFERRED_BACKGROUND_COLOR;
|
||||
}
|
||||
return isSelected ? SELECTED_BACKGROUND_COLOR : BACKGROUND_COLOR;
|
||||
|
||||
Reference in New Issue
Block a user