use of com.intellij.openapi.util.ScalableIcon in project intellij-community by JetBrains.
the class IdeConsoleRootType method substituteIcon.
@Nullable
@Override
public Icon substituteIcon(@NotNull Project project, @NotNull VirtualFile file) {
FileType fileType = FileTypeManager.getInstance().getFileTypeByFileName(file.getName());
if (fileType == UnknownFileType.INSTANCE || fileType == PlainTextFileType.INSTANCE) {
return AllIcons.Debugger.ToolConsole;
}
Icon icon = fileType.getIcon();
Icon subscript = ((ScalableIcon) AllIcons.Debugger.ToolConsole).scale(.5f);
LayeredIcon icons = new LayeredIcon(2);
icons.setIcon(icon, 0);
icons.setIcon(subscript, 1, 8, 8);
return JBUI.scale(icons);
}
Aggregations