-
Notifications
You must be signed in to change notification settings - Fork 911
Fix display of mod with extra long display name #6436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
37c2088
a069ce6
ca68af0
0157781
bcca244
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -411,6 +411,7 @@ final class ModInfoDialog extends JFXDialogLayout { | |
| modInfo.loadIcon(imageContainer, null); | ||
|
|
||
| TwoLineListItem title = new TwoLineListItem(); | ||
| title.getTitleLabel().setWrapText(true); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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()) | ||
|
ZZZank marked this conversation as resolved.
|
||
| title.setTitle(modInfo.getModTranslations().getDisplayName()); | ||
| else | ||
|
|
@@ -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()); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.