diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java index cb0513b64e..208bd5aa51 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java @@ -205,17 +205,12 @@ protected ModDownloadPageSkin(DownloadPage control) { VBox pane = new VBox(8); pane.getStyleClass().add("gray-background"); pane.setPadding(new Insets(10)); - ScrollPane scrollPane = new ScrollPane(pane); - FXUtils.smoothScrolling(scrollPane); - scrollPane.setFitToWidth(true); - scrollPane.setFitToHeight(true); HBox descriptionPane = new HBox(8); descriptionPane.setMinHeight(Region.USE_PREF_SIZE); descriptionPane.setAlignment(Pos.CENTER); pane.getChildren().add(descriptionPane); descriptionPane.getStyleClass().add("card-non-transparent"); - BorderPane.setMargin(descriptionPane, new Insets(11, 11, 0, 11)); { ImageView imageView = new ImageView(); imageView.setFitWidth(40); @@ -266,8 +261,12 @@ protected ModDownloadPageSkin(DownloadPage control) { spinnerPane.setOnFailedAction(e -> getSkinnable().loadModVersions()); ComponentList list = new ComponentList(); - StackPane.setAlignment(list, Pos.TOP_CENTER); - spinnerPane.setContent(list); + ScrollPane scrollPane = new ScrollPane(list); + FXUtils.smoothScrolling(scrollPane); + scrollPane.setFitToWidth(true); + scrollPane.setFitToHeight(true); + StackPane.setAlignment(scrollPane, Pos.TOP_CENTER); + spinnerPane.setContent(scrollPane); FXUtils.onChangeAndOperate(control.loaded, loaded -> { if (control.versions == null) return; @@ -321,7 +320,7 @@ protected ModDownloadPageSkin(DownloadPage control) { }); } - getChildren().setAll(scrollPane); + getChildren().setAll(pane); } }