IDEA-103040 ComboBoxItem is not readable after select

This commit is contained in:
Vassiliy Kudryashov
2013-03-19 16:55:35 +04:00
parent 6fc0a83581
commit 7cd221d0c9
2 changed files with 7 additions and 3 deletions
@@ -131,7 +131,7 @@ public class OrderEntryAppearanceServiceImpl extends OrderEntryAppearanceService
if (showVersion) {
String versionString = jdk.getVersionString();
if (versionString != null && !versionString.equals(name)) {
SimpleTextAttributes textAttributes = isInComboBox ? SimpleTextAttributes.SYNTHETIC_ATTRIBUTES :
SimpleTextAttributes textAttributes = isInComboBox && !selected ? SimpleTextAttributes.SYNTHETIC_ATTRIBUTES :
SystemInfo.isMac && selected ? new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN,
Color.WHITE): SimpleTextAttributes.GRAY_ATTRIBUTES;
ending.addComment(versionString, textAttributes);
@@ -145,7 +145,7 @@ public class OrderEntryAppearanceServiceImpl extends OrderEntryAppearanceService
if (!valid) {
return SimpleTextAttributes.ERROR_ATTRIBUTES;
}
else if (selected) {
else if (selected && !(SystemInfo.isWinVistaOrNewer && UIManager.getLookAndFeel().getName().contains("Windows"))) {
return SimpleTextAttributes.SELECTED_SIMPLE_CELL_ATTRIBUTES;
}
else {
@@ -27,6 +27,7 @@ import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.roots.ui.OrderEntryAppearanceService;
import com.intellij.openapi.ui.FixedSizeButton;
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.ui.ColoredListCellRenderer;
import com.intellij.ui.SimpleColoredComponent;
import com.intellij.ui.SimpleTextAttributes;
@@ -177,7 +178,10 @@ public class AntUIUtil {
if (jdk == null) {
if (myProjectJdkName.length() > 0) {
setIcon(AllIcons.General.Jdk);
append(AntBundle.message("project.jdk.project.jdk.name.list.column.value", myProjectJdkName), selected ? SimpleTextAttributes.SELECTED_SIMPLE_CELL_ATTRIBUTES : SimpleTextAttributes.SIMPLE_CELL_ATTRIBUTES);
append(AntBundle.message("project.jdk.project.jdk.name.list.column.value", myProjectJdkName),
selected && !(SystemInfo.isWinVistaOrNewer && UIManager.getLookAndFeel().getName().contains("Windows"))
? SimpleTextAttributes.SELECTED_SIMPLE_CELL_ATTRIBUTES
: SimpleTextAttributes.SIMPLE_CELL_ATTRIBUTES);
}
else {
setIcon(PlatformIcons.INVALID_ENTRY_ICON);