Skip to content

Commit c669026

Browse files
authored
Fix #4067: 修复使用 JavaFX 25 启动时下载界面布局错位的问题 (#4069)
1 parent d9b95b2 commit c669026

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

HMCL/src/main/java/org/jackhuang/hmcl/ui/download/AbstractInstallersPage.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,14 @@ protected InstallersPageSkin(AbstractInstallersPage control) {
121121
InstallerItem[] libraries = control.group.getLibraries();
122122

123123
FlowPane libraryPane = new FlowPane(libraries);
124-
libraryPane.setVgap(16);
124+
libraryPane.setVgap(8);
125125
libraryPane.setHgap(16);
126126

127-
if (libraries.length <= 8) {
128-
BorderPane.setMargin(libraryPane, new Insets(16, 0, 16, 0));
129-
root.setCenter(libraryPane);
130-
} else {
131-
ScrollPane scrollPane = new ScrollPane(libraryPane);
132-
scrollPane.setFitToWidth(true);
133-
scrollPane.setFitToHeight(true);
134-
BorderPane.setMargin(scrollPane, new Insets(16, 0, 16, 0));
135-
root.setCenter(scrollPane);
136-
}
127+
ScrollPane scrollPane = new ScrollPane(libraryPane);
128+
scrollPane.setFitToWidth(true);
129+
scrollPane.setFitToHeight(true);
130+
BorderPane.setMargin(scrollPane, new Insets(16, 0, 16, 0));
131+
root.setCenter(scrollPane);
137132
}
138133

139134
{

0 commit comments

Comments
 (0)