Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ public ObservableList<Label> getTags() {

FXUtils.setOverflowHidden(tagsBox);

lblTitle.setMinWidth(Label.USE_PREF_SIZE);
HBox.setHgrow(lblTitle, Priority.ALWAYS);
lblTitle.setMinWidth(0);
firstLine.getChildren().setAll(lblTitle, tagsBox);
Comment thread
ZZZank marked this conversation as resolved.
}
return tags;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ final class ModInfoDialog extends JFXDialogLayout {
modInfo.loadIcon(imageContainer, null);

TwoLineListItem title = new TwoLineListItem();
title.getTitleLabel().setWrapText(true);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Cap the wrapped dialog title height

For a mod whose metadata or translation contains a sufficiently long display name, unrestricted wrapping makes the heading's preferred height grow without bound. These names are not length-limited when parsed, while this dialog caps only the description viewport and provides neither a maximum height nor scrolling for the heading, so the dialog can grow taller than the launcher and push its body and action buttons outside the visible area; constrain the heading height or place the overall dialog content in a bounded scrolling container.

Useful? React with 👍 / 👎.

if (modInfo.getModTranslations() != null && I18n.isUseChinese())
Comment thread
ZZZank marked this conversation as resolved.
title.setTitle(modInfo.getModTranslations().getDisplayName());
else
Expand Down Expand Up @@ -565,6 +566,7 @@ final class ModInfoListCell extends MDListCell<ModInfoObject> {
container.setAlignment(Pos.CENTER_LEFT);
HBox.setHgrow(content, Priority.ALWAYS);
content.setMouseTransparent(true);
content.getTitleLabel().setTextOverrun(OverrunStyle.ELLIPSIS);
setSelectable();

imageContainer.setImage(GameInstanceIconType.COMMAND.getIcon());
Expand Down