From a470475c219b866b62fb90c00aa469b97bce50be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=9E=E5=BA=90?= <109708109+CiiLu@users.noreply.github.com> Date: Sat, 2 Aug 2025 15:22:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E7=BB=84=E4=B8=8B=E8=BD=BD=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=BF=BB=E9=A1=B5=E5=90=8E=E8=87=AA=E5=8A=A8=E5=9B=9E?= =?UTF-8?q?=E5=88=B0=E9=A1=B6=E9=83=A8=20(#4170)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java index d2da008cc..7d8fdc134 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java @@ -229,6 +229,7 @@ public class DownloadListPage extends Control implements DecoratorPage, VersionP } private static class ModDownloadListPageSkin extends SkinBase { + private final JFXListView listView = new JFXListView<>(); protected ModDownloadListPageSkin(DownloadListPage control) { super(control); @@ -449,6 +450,8 @@ public class DownloadListPage extends Control implements DecoratorPage, VersionP boolean disableNext = disableAll || pageOffset == pageCount - 1; nextPageButton.setDisable(disableNext); lastPageButton.setDisable(disableNext); + + listView.scrollTo(0); }; FXUtils.onChange(control.pageCount, pageCountN -> { @@ -504,7 +507,6 @@ public class DownloadListPage extends Control implements DecoratorPage, VersionP } }); - JFXListView listView = new JFXListView<>(); spinnerPane.setContent(listView); Bindings.bindContent(listView.getItems(), getSkinnable().items); FXUtils.onClicked(listView, () -> {