From 87789beeb7d418ff73c4eaa5a7cdca4ab2c23fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=AB=E4=B9=90=E5=87=A4=E7=88=AA=E7=8E=8B?= <165921128+KSSJW@users.noreply.github.com> Date: Sat, 1 Aug 2026 20:50:06 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E4=BF=AE=E5=A4=8D=20ModDownloadListPage?= =?UTF-8?q?=20=E6=9C=AB=E5=B0=BE=E9=A1=B9=20Padding=20(#6564)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jackhuang/hmcl/ui/instances/DownloadListPage.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/instances/DownloadListPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/instances/DownloadListPage.java index 467d7d5517..6a1f91f9dc 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/instances/DownloadListPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/instances/DownloadListPage.java @@ -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();