mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-08-03 11:26:38 -04:00
修复 InstallersPage 意外地显示滚动条的问题 (#4097)
This reverts commit c669026312e102eaf880d162ed95d6fccf16bbf2.
This commit is contained in:
parent
cbb83d4f15
commit
f9dd7a1e64
@ -121,15 +121,20 @@ 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(8);
|
libraryPane.setVgap(16);
|
||||||
libraryPane.setHgap(16);
|
libraryPane.setHgap(16);
|
||||||
|
|
||||||
|
if (libraries.length <= 8) {
|
||||||
|
BorderPane.setMargin(libraryPane, new Insets(16, 0, 16, 0));
|
||||||
|
root.setCenter(libraryPane);
|
||||||
|
} else {
|
||||||
ScrollPane scrollPane = new ScrollPane(libraryPane);
|
ScrollPane scrollPane = new ScrollPane(libraryPane);
|
||||||
scrollPane.setFitToWidth(true);
|
scrollPane.setFitToWidth(true);
|
||||||
scrollPane.setFitToHeight(true);
|
scrollPane.setFitToHeight(true);
|
||||||
BorderPane.setMargin(scrollPane, new Insets(16, 0, 16, 0));
|
BorderPane.setMargin(scrollPane, new Insets(16, 0, 16, 0));
|
||||||
root.setCenter(scrollPane);
|
root.setCenter(scrollPane);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
JFXButton installButton = FXUtils.newRaisedButton(i18n("button.install"));
|
JFXButton installButton = FXUtils.newRaisedButton(i18n("button.install"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user