diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java index 7de131b011..5601cf167a 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java @@ -531,7 +531,6 @@ protected ModDownloadListPageSkin(DownloadListPage control) { listView.setSelectionModel(new NoneMultipleSelectionModel<>()); // ListViewBehavior would consume ESC pressed event, preventing us from handling it, so we ignore it here ignoreEvent(listView, KeyEvent.KEY_PRESSED, e -> e.getCode() == KeyCode.ESCAPE); - listView.setCellFactory(x -> new ListCell<>() { private static final Insets PADDING = new Insets(9, 9, 0, 9); @@ -578,7 +577,11 @@ protected void updateItem(RemoteMod item, boolean empty) { } else { ModTranslations.Mod mod = ModTranslations.getTranslationsByRepositoryType(getSkinnable().repository.getType()).getModByCurseForgeId(item.getSlug()); content.setTitle(mod != null && I18n.isUseChinese() ? mod.getDisplayName() : item.getTitle()); - content.setSubtitle(item.getDescription()); + String description = item.getDescription(); + if (description != null) { + description = description.replaceAll("\\R", " "); + } + content.setSubtitle(description); content.getTags().clear(); for (String category : item.getCategories()) { if (getSkinnable().shouldDisplayCategory(category))