fix: 模组名字过长导致下载页面布局异常 (#5943)

This commit is contained in:
辞庐 authored and GitHub committed 2026-04-12 21:40:05 +08:00
1 parent 5991112cd8
commit fe70cc3daf
2 files changed
+6

No files matched your search

@@ -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);
@@ -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) {