From e7e8d45497266e7b34acbca714230a06eaca90af Mon Sep 17 00:00:00 2001 From: Glavo Date: Sat, 22 Feb 2025 14:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E6=AD=A2=E6=95=B4=E5=90=88=E5=8C=85?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E5=85=A8=E5=B1=80=E6=B8=B8=E6=88=8F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=20(#3639)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 禁止整合包复制全局游戏设置 * update --- .../hmcl/ui/versions/VersionSettingsPage.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/VersionSettingsPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/VersionSettingsPage.java index bf9b96a08..f1ff1402c 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/VersionSettingsPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/VersionSettingsPage.java @@ -195,9 +195,10 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag copyGlobalPane.setLeft(label); BorderPane.setAlignment(label, Pos.CENTER_LEFT); - JFXButton button = new JFXButton(i18n("settings.game.copy_global.copy_all")); - copyGlobalPane.setRight(button); - button.setOnAction(e -> Controllers.confirm(i18n("settings.game.copy_global.copy_all.confirm"), null, () -> { + JFXButton copyAll = new JFXButton(i18n("settings.game.copy_global.copy_all")); + copyAll.disableProperty().bind(modpack); + copyGlobalPane.setRight(copyAll); + copyAll.setOnAction(e -> Controllers.confirm(i18n("settings.game.copy_global.copy_all.confirm"), null, () -> { Set ignored = new HashSet<>(Arrays.asList( "usesGlobal", "versionIcon" @@ -205,8 +206,8 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag PropertyUtils.copyProperties(profile.getGlobal(), lastVersionSetting, name -> !ignored.contains(name)); }, null)); - button.getStyleClass().add("jfx-button-border"); - BorderPane.setAlignment(button, Pos.CENTER_RIGHT); + copyAll.getStyleClass().add("jfx-button-border"); + BorderPane.setAlignment(copyAll, Pos.CENTER_RIGHT); } componentList.getContent().add(copyGlobalPane);