Skip to content

Commit 8fdd81d

Browse files
authored
Revert "Fix #4067: 修复使用 JavaFX 25 启动时下载界面布局错位的问题 (#4069)"
This reverts commit c669026.
1 parent cbb83d4 commit 8fdd81d

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

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

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

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

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);
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+
}
132137
}
133138

134139
{

0 commit comments

Comments
 (0)