Icon (@Nullable Editor editor, @Nullable Icon icon, @NotNull Icon standard) { if (Registry.is("editor.scale.completion.icons")) { standard = EditorUtil.scaleIconAccordingEditorFont(standard, editor); icon = EditorUtil.scaleIconAccordingEditorFont(icon, editor); } if (icon == null) { return standard; } icon = removeVisibilityIfNeeded(editor, icon, standard); if (icon.getIconHeight() < standard.getIconHeight() || icon.getIconWidth() < standard.getIconWidth()) { final LayeredIcon layeredIcon = new LayeredIcon(2); layeredIcon.setIcon(icon, 0, 0, (standard.getIconHeight() - icon.getIconHeight()) / 2); layeredIcon.setIcon(standard, 1); return layeredIcon; } return icon; }