This commit is contained in:
Burning_TNT 2024-02-27 16:35:00 +08:00 committed by GitHub
parent 20ed42ab8a
commit 2ee5d9ceed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -413,7 +413,7 @@ public class DownloadListPage extends Control implements DecoratorPage, VersionP
searchAction.handle(event);
});
lastPageButton.setDisable(true);
control.pageCount.addListener((observable, oldValue, newValue) -> lastPageButton.setDisable(control.pageCount.get() == -1));
control.pageCount.addListener((observable, oldValue, newValue) -> lastPageButton.setDisable(control.pageCount.get() == -1 || control.pageOffset.get() >= control.pageCount.get() - 1));
Pane placeholder = new Pane();
HBox.setHgrow(placeholder, Priority.SOMETIMES);