mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[followup] IDEA-162563 Action menus do not have icons under HiDPI linux
- New interface: JBUI.JBIcon. EmptyIcon now implements it. - New method: JBUI.scale(JBIcon)
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ public class ImportStaticLookupActionProvider implements LookupActionProvider {
|
||||
}
|
||||
|
||||
final Icon checkIcon = PlatformIcons.CHECK_ICON;
|
||||
final Icon icon = item.willBeImported() ? checkIcon : new EmptyIcon(checkIcon.getIconWidth(), checkIcon.getIconHeight());
|
||||
final Icon icon = item.willBeImported() ? checkIcon : EmptyIcon.create(checkIcon);
|
||||
consumer.consume(new LookupElementAction(icon, "Import statically") {
|
||||
@Override
|
||||
public Result performLookupAction() {
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.psi.util.PsiUtil;
|
||||
import com.intellij.util.containers.HashMap;
|
||||
import com.intellij.util.ui.ColorIcon;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -153,7 +154,7 @@ public class VariableLookupItem extends LookupItem<PsiVariable> implements Typed
|
||||
myHelper.renderElement(presentation, qualify, true, getSubstitutor());
|
||||
}
|
||||
if (myColor != null) {
|
||||
presentation.setTypeText("", new ColorIcon(12, myColor));
|
||||
presentation.setTypeText("", JBUI.scale(new ColorIcon(12, myColor)));
|
||||
} else {
|
||||
presentation.setTypeText(getType().getPresentableText());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user