Icon (@Nullable Editor editor, @NotNull Icon icon, @NotNull Icon standard) { if (icon instanceof IconDecorator decoratorIcon) { Icon delegateIcon = decoratorIcon.getDelegate(); if (delegateIcon != null) { return decoratorIcon.withDelegate(removeVisibility(editor, delegateIcon, standard)); } } else if (icon instanceof RowIcon rowIcon) { if (rowIcon.getIconCount() >= 1) { Icon firstIcon = rowIcon.getIcon(0); if (firstIcon != null) { return Registry.is("editor.scale.completion.icons") ? EditorUtil.scaleIconAccordingEditorFont(firstIcon, editor) : firstIcon; } } } else if (icon.getIconWidth() > standard.getIconWidth() || icon.getIconHeight() > standard.getIconHeight()) { return IconUtil.cropIcon(icon, new Rectangle(standard.getIconWidth(), standard.getIconHeight())); } return icon; }