mirror of
https://github.com/HMCL-dev/HMCL
synced 2026-08-19 22:23:08 -04:00
Fix: 修复 ModDownloadListPage 末尾项 Padding (#6564)
This commit is contained in:
parent
bb86100c54
commit
87789beeb7
1 changed files with 7 additions and 0 deletions
|
|
@ -542,6 +542,7 @@ public class DownloadListPage extends Control implements DecoratorPage, GameInst
|
|||
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);
|
||||
private static final Insets LAST_PADDING = new Insets(9, 9, 9, 9);
|
||||
|
||||
private final RipplerContainer graphic;
|
||||
private final StackPane wrapper = new StackPane();
|
||||
|
|
@ -584,6 +585,12 @@ public class DownloadListPage extends Control implements DecoratorPage, GameInst
|
|||
if (empty || item == null) {
|
||||
setGraphic(null);
|
||||
} else {
|
||||
setPadding(
|
||||
getIndex() == getListView().getItems().size() - 1
|
||||
? LAST_PADDING
|
||||
: PADDING
|
||||
);
|
||||
|
||||
ModTranslations.Mod mod = ModTranslations.getTranslationsByRepositoryType(getSkinnable().repository.getType()).getModByCurseForgeId(item.slug());
|
||||
content.setTitle(mod != null && I18n.isUseChinese() ? mod.getDisplayName() : item.title());
|
||||
String description = item.description();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue