Fix #4067: 修复使用 JavaFX 25 启动时下载界面布局错位的问题 (#4069)

This commit is contained in:
Glavo 2025-07-05 22:29:07 +08:00 committed by GitHub
parent d9b95b28b2
commit c669026312
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -121,19 +121,14 @@ public abstract class AbstractInstallersPage extends Control implements WizardPa
InstallerItem[] libraries = control.group.getLibraries(); InstallerItem[] libraries = control.group.getLibraries();
FlowPane libraryPane = new FlowPane(libraries); FlowPane libraryPane = new FlowPane(libraries);
libraryPane.setVgap(16); libraryPane.setVgap(8);
libraryPane.setHgap(16); libraryPane.setHgap(16);
if (libraries.length <= 8) { ScrollPane scrollPane = new ScrollPane(libraryPane);
BorderPane.setMargin(libraryPane, new Insets(16, 0, 16, 0)); scrollPane.setFitToWidth(true);
root.setCenter(libraryPane); scrollPane.setFitToHeight(true);
} else { BorderPane.setMargin(scrollPane, new Insets(16, 0, 16, 0));
ScrollPane scrollPane = new ScrollPane(libraryPane); root.setCenter(scrollPane);
scrollPane.setFitToWidth(true);
scrollPane.setFitToHeight(true);
BorderPane.setMargin(scrollPane, new Insets(16, 0, 16, 0));
root.setCenter(scrollPane);
}
} }
{ {