统一导出和导入整合包页面样式 (#3822)

This commit is contained in:
辞庐 2025-04-13 22:34:22 +08:00 committed by GitHub
parent 8bcbe74d82
commit b4945a150e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,15 +43,15 @@ public final class ModpackTypeSelectionPage extends VBox implements WizardPage {
public ModpackTypeSelectionPage(WizardController controller) { public ModpackTypeSelectionPage(WizardController controller) {
this.controller = controller; this.controller = controller;
this.setStyle("-fx-background-color: white; -fx-background-radius: 5;");
this.setPadding(new Insets(10)); this.setPadding(new Insets(10));
Label title = new Label(i18n("modpack.export.as")); Label title = new Label(i18n("modpack.export.as"));
title.setStyle("-fx-font-size: 14px; -fx-font-weight: bold;");
VBox.setMargin(title, new Insets(8, 0, 8, 12)); VBox.setMargin(title, new Insets(8, 0, 8, 12));
this.getStyleClass().add("jfx-list-view"); this.getStyleClass().add("jfx-list-view");
this.setMaxSize(500, 150); this.setMaxSize(400, 150);
this.setSpacing(8);
this.getChildren().setAll( this.getChildren().setAll(
title, title,
createButton(MODPACK_TYPE_MCBBS, McbbsModpackExportTask.OPTION), createButton(MODPACK_TYPE_MCBBS, McbbsModpackExportTask.OPTION),
@ -62,6 +62,8 @@ public final class ModpackTypeSelectionPage extends VBox implements WizardPage {
private JFXButton createButton(String type, ModpackExportInfo.Options option) { private JFXButton createButton(String type, ModpackExportInfo.Options option) {
JFXButton button = new JFXButton(); JFXButton button = new JFXButton();
button.getStyleClass().add("card");
button.setOnAction(e -> { button.setOnAction(e -> {
controller.getSettings().put(MODPACK_TYPE, type); controller.getSettings().put(MODPACK_TYPE, type);
controller.getSettings().put(MODPACK_INFO_OPTION, option); controller.getSettings().put(MODPACK_INFO_OPTION, option);