IDEA-301531 Fix invalid alignment in intention actions

GitOrigin-RevId: da1f6b5a5feb4b097062e1ccc33889063029b316
This commit is contained in:
Alexey Merkulov
2022-10-28 13:21:00 +00:00
committed by intellij-monorepo-bot
parent 2d94257b0a
commit c5a042c676
@@ -225,7 +225,7 @@ public class IntentionListStep implements ListPopupStep<IntentionActionWithTextC
@Override
public Icon getIconFor(IntentionActionWithTextCaching value) {
Icon icon = getOriginalIconFor(value);
if (icon == null) {
if (icon == null || icon instanceof EmptyIcon) {
icon = EmptyIcon.create(myMaxIconSize.width, myMaxIconSize.height);
}
return icon;
@@ -281,7 +281,7 @@ public class IntentionListStep implements ListPopupStep<IntentionActionWithTextC
for (IntentionActionWithTextCaching action : myCachedIntentions.getAllActions()) {
if (!action.isShowIcon()) continue;
Icon icon = myCachedIntentions.getIcon(action);
if (icon == null) continue;
if (icon == null || icon instanceof EmptyIcon) continue;
maxWidth = Math.max(maxWidth, icon.getIconWidth());
maxHeight = Math.max(maxHeight, icon.getIconHeight());
}