Skip to content

Commit 41d9e05

Browse files
authored
Merge pull request #2372 from Haehnchen/feature/layered-icon-deprecated
replace deprecataed "new LayeredIcon" usages
2 parents 46b065c + cba4358 commit 41d9e05

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/fr/adrienbrault/idea/symfony2plugin/translation/TranslationKeyTargetFakePsiNavigationItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private Icon getFileIcon() {
9797

9898
if (rootDir != null && isSymfonyTranslationDirectory()) {
9999
SizedIcon sizedIcon = new SizedIcon(Symfony2Icons.SYMFONY_LINE_MARKER, fileIcon.getIconWidth() / 2, fileIcon.getIconHeight() / 2);
100-
LayeredIcon icon = new LayeredIcon(fileIcon, sizedIcon);
100+
LayeredIcon icon = LayeredIcon.layeredIcon(new Icon[]{fileIcon, sizedIcon});
101101
icon.setIcon(sizedIcon, 1, SwingConstants.SOUTH_EAST);
102102
return icon;
103103
}

src/main/java/fr/adrienbrault/idea/symfony2plugin/twig/icon/TwigIconProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ public Icon getIcon(@NotNull PsiElement element, @Iconable.IconFlags int flags)
3131
// attach controller icon overlay
3232
LayeredIcon icon = null;
3333
if (hasController((TwigFile) element)) {
34-
icon = new LayeredIcon(TwigIcons.TwigFileIcon, Symfony2Icons.TWIG_CONTROLLER_FILE);
34+
icon = LayeredIcon.layeredIcon(new Icon[]{TwigIcons.TwigFileIcon, Symfony2Icons.TWIG_CONTROLLER_FILE});
3535
icon.setIcon(Symfony2Icons.TWIG_CONTROLLER_FILE, 1, SwingConstants.NORTH_WEST);
3636
}
3737

3838
// file provides extends tag, add another layer on top; but put the layer below the previous layer if provided
3939
if (hasFileExtendsTag(element)) {
4040
if (icon == null) {
4141
// we are alone so just place the icon
42-
icon = new LayeredIcon(TwigIcons.TwigFileIcon, Symfony2Icons.TWIG_EXTENDS_FILE);
42+
icon = LayeredIcon.layeredIcon(new Icon[]{TwigIcons.TwigFileIcon, Symfony2Icons.TWIG_EXTENDS_FILE});
4343
icon.setIcon(Symfony2Icons.TWIG_EXTENDS_FILE, 1, SwingConstants.NORTH_WEST);
4444
} else {
4545
// icon should be below first one
46-
icon = new LayeredIcon(icon, Symfony2Icons.TWIG_IMPLEMENTS_FILE);
46+
LayeredIcon.layeredIcon(new Icon[]{Symfony2Icons.TWIG_IMPLEMENTS_FILE});
4747
icon.setIcon(Symfony2Icons.TWIG_EXTENDS_FILE, 1, 0, Symfony2Icons.TWIG_CONTROLLER_FILE.getIconHeight() + 1);
4848
}
4949
}

0 commit comments

Comments
 (0)