Replaced hard-coded gray color
This commit is contained in:
@@ -35,9 +35,9 @@ import com.intellij.codeInsight.lookup.LookupElementDecorator
|
||||
import com.intellij.codeInsight.lookup.LookupElementPresentation
|
||||
import org.jetbrains.jet.lang.types.JetType
|
||||
import org.jetbrains.jet.plugin.caches.resolve.ResolutionFacade
|
||||
import java.awt.Color
|
||||
import com.intellij.codeInsight.lookup.DefaultLookupItemRenderer
|
||||
import org.jetbrains.jet.lang.types.TypeUtils
|
||||
import com.intellij.codeInsight.lookup.impl.LookupCellRenderer
|
||||
|
||||
public class LookupElementFactory(
|
||||
private val receiverTypes: Collection<JetType>
|
||||
@@ -78,7 +78,7 @@ public class LookupElementFactory(
|
||||
presentation.setItemTextBold(true)
|
||||
}
|
||||
else {
|
||||
presentation.setItemTextForeground(Color.GRAY)
|
||||
presentation.setItemTextForeground(LookupCellRenderer.getGrayedForeground(false))
|
||||
// gray all tail fragments too:
|
||||
val fragments = presentation.getTailFragments()
|
||||
presentation.clearTail()
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.intellij.codeInsight.lookup.LookupElement;
|
||||
import com.intellij.codeInsight.lookup.LookupElementPresentation;
|
||||
import com.intellij.codeInsight.lookup.impl.LookupCellRenderer;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.ui.JBColor;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
@@ -326,7 +327,7 @@ public class ExpectedCompletionUtils {
|
||||
}
|
||||
Color foreground = presentation.getItemTextForeground();
|
||||
if (!foreground.equals(JBColor.foreground())) {
|
||||
assert foreground.equals(Color.GRAY);
|
||||
assert foreground.equals(LookupCellRenderer.getGrayedForeground(false));
|
||||
if (builder.length() > 0) builder.append(" ");
|
||||
builder.append("grayed");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user