diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TwoLineListItem.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TwoLineListItem.java index 35f99b9ac0..621a2c548d 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TwoLineListItem.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TwoLineListItem.java @@ -147,6 +147,10 @@ public class TwoLineListItem extends VBox { subtitleProperty().set(subtitle); } + public HBox getFirstLine() { + return firstLine; + } + public Label getTitleLabel() { return lblTitle; } @@ -168,6 +172,7 @@ public class TwoLineListItem extends VBox { Bindings.bindContent(tagsBox.getChildren(), tags); var scrollPane = new ScrollPane(tagsBox); + scrollPane.setMinSize(0, 0); HBox.setHgrow(scrollPane, Priority.ALWAYS); lblTitle.setMinWidth(Label.USE_PREF_SIZE); scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java index c42c0b3cb7..681d766c2c 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java @@ -227,6 +227,7 @@ public class DownloadPage extends Control implements DecoratorPage { getSkinnable().addon.getCategories().stream() .map(category -> getSkinnable().page.getLocalizedCategory(category)) .forEach(content::addTag); + content.getFirstLine().setMinWidth(0); descriptionPane.getChildren().add(content); if (getSkinnable().mod != null) {