|
32 | 32 | import javafx.scene.control.ScrollPane; |
33 | 33 | import javafx.scene.control.Skin; |
34 | 34 | import javafx.scene.control.SkinBase; |
35 | | -import javafx.scene.layout.BorderPane; |
36 | 35 | import javafx.scene.layout.HBox; |
37 | 36 | import javafx.scene.layout.Priority; |
38 | 37 | import javafx.scene.layout.Region; |
@@ -224,17 +223,12 @@ protected ModDownloadPageSkin(DownloadPage control) { |
224 | 223 | VBox pane = new VBox(8); |
225 | 224 | pane.getStyleClass().add("gray-background"); |
226 | 225 | pane.setPadding(new Insets(10)); |
227 | | - ScrollPane scrollPane = new ScrollPane(pane); |
228 | | - FXUtils.smoothScrolling(scrollPane); |
229 | | - scrollPane.setFitToWidth(true); |
230 | | - scrollPane.setFitToHeight(true); |
231 | 226 |
|
232 | 227 | HBox descriptionPane = new HBox(8); |
233 | 228 | descriptionPane.setMinHeight(Region.USE_PREF_SIZE); |
234 | 229 | descriptionPane.setAlignment(Pos.CENTER); |
235 | 230 | pane.getChildren().add(descriptionPane); |
236 | 231 | descriptionPane.getStyleClass().add("card-non-transparent"); |
237 | | - BorderPane.setMargin(descriptionPane, new Insets(11, 11, 0, 11)); |
238 | 232 | { |
239 | 233 | var imageContainer = new ImageContainer(40); |
240 | 234 | if (StringUtils.isNotBlank(getSkinnable().addon.getIconUrl())) { |
@@ -283,8 +277,12 @@ protected ModDownloadPageSkin(DownloadPage control) { |
283 | 277 | spinnerPane.setOnFailedAction(e -> getSkinnable().loadModVersions()); |
284 | 278 |
|
285 | 279 | ComponentList list = new ComponentList(); |
286 | | - StackPane.setAlignment(list, Pos.TOP_CENTER); |
287 | | - spinnerPane.setContent(list); |
| 280 | + ScrollPane scrollPane = new ScrollPane(list); |
| 281 | + FXUtils.smoothScrolling(scrollPane); |
| 282 | + scrollPane.setFitToWidth(true); |
| 283 | + scrollPane.setFitToHeight(true); |
| 284 | + StackPane.setAlignment(scrollPane, Pos.TOP_CENTER); |
| 285 | + spinnerPane.setContent(scrollPane); |
288 | 286 |
|
289 | 287 | FXUtils.onChangeAndOperate(control.loaded, loaded -> { |
290 | 288 | if (control.versions == null) return; |
@@ -338,7 +336,7 @@ protected ModDownloadPageSkin(DownloadPage control) { |
338 | 336 | }); |
339 | 337 | } |
340 | 338 |
|
341 | | - getChildren().setAll(scrollPane); |
| 339 | + getChildren().setAll(pane); |
342 | 340 | } |
343 | 341 | } |
344 | 342 |
|
|
0 commit comments