diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountListItemSkin.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountListItemSkin.java index 52fceb890..ea6b28dbf 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountListItemSkin.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountListItemSkin.java @@ -42,10 +42,9 @@ import org.jackhuang.hmcl.ui.SVG; import org.jackhuang.hmcl.ui.construct.SpinnerPane; import org.jackhuang.hmcl.util.javafx.BindingMapping; -import static org.jackhuang.hmcl.ui.FXUtils.runInFX; import static org.jackhuang.hmcl.util.i18n.I18n.i18n; -public class AccountListItemSkin extends SkinBase { +public final class AccountListItemSkin extends SkinBase { public AccountListItemSkin(AccountListItem skinnable) { super(skinnable); @@ -118,10 +117,10 @@ public class AccountListItemSkin extends SkinBase { btnMove.getStyleClass().add("toggle-icon4"); if (skinnable.getAccount().isPortable()) { btnMove.setGraphic(SVG.EARTH.createIcon(Theme.blackFill(), -1, -1)); - runInFX(() -> FXUtils.installFastTooltip(btnMove, i18n("account.move_to_global"))); + FXUtils.installFastTooltip(btnMove, i18n("account.move_to_global")); } else { btnMove.setGraphic(SVG.EXPORT.createIcon(Theme.blackFill(), -1, -1)); - runInFX(() -> FXUtils.installFastTooltip(btnMove, i18n("account.move_to_portable"))); + FXUtils.installFastTooltip(btnMove, i18n("account.move_to_portable")); } spinnerMove.setContent(btnMove); right.getChildren().add(spinnerMove); @@ -143,7 +142,7 @@ public class AccountListItemSkin extends SkinBase { }); btnRefresh.getStyleClass().add("toggle-icon4"); btnRefresh.setGraphic(SVG.REFRESH.createIcon(Theme.blackFill(), -1, -1)); - runInFX(() -> FXUtils.installFastTooltip(btnRefresh, i18n("button.refresh"))); + FXUtils.installFastTooltip(btnRefresh, i18n("button.refresh")); spinnerRefresh.setContent(btnRefresh); right.getChildren().add(spinnerRefresh); @@ -160,7 +159,7 @@ public class AccountListItemSkin extends SkinBase { }); btnUpload.getStyleClass().add("toggle-icon4"); btnUpload.setGraphic(SVG.HANGER.createIcon(Theme.blackFill(), -1, -1)); - runInFX(() -> FXUtils.installFastTooltip(btnUpload, i18n("account.skin.upload"))); + FXUtils.installFastTooltip(btnUpload, i18n("account.skin.upload")); spinnerUpload.managedProperty().bind(spinnerUpload.visibleProperty()); spinnerUpload.visibleProperty().bind(skinnable.canUploadSkin()); spinnerUpload.setContent(btnUpload); @@ -170,9 +169,10 @@ public class AccountListItemSkin extends SkinBase { JFXButton btnCopyUUID = new JFXButton(); SpinnerPane spinnerCopyUUID = new SpinnerPane(); spinnerCopyUUID.getStyleClass().add("small-spinner-pane"); + btnUpload.getStyleClass().add("toggle-icon4"); btnCopyUUID.setOnAction(e -> FXUtils.copyText(skinnable.getAccount().getUUID().toString())); btnCopyUUID.setGraphic(SVG.COPY.createIcon(Theme.blackFill(), -1, -1)); - runInFX(() -> FXUtils.installFastTooltip(btnCopyUUID, i18n("account.copy_uuid"))); + FXUtils.installFastTooltip(btnCopyUUID, i18n("account.copy_uuid")); spinnerCopyUUID.setContent(btnCopyUUID); right.getChildren().add(spinnerCopyUUID); @@ -180,8 +180,8 @@ public class AccountListItemSkin extends SkinBase { btnRemove.setOnAction(e -> Controllers.confirm(i18n("button.remove.confirm"), i18n("button.remove"), skinnable::remove, null)); btnRemove.getStyleClass().add("toggle-icon4"); BorderPane.setAlignment(btnRemove, Pos.CENTER); - btnRemove.setGraphic(SVG.DELETE.createIcon(Theme.blackFill(), -1, -1)); - runInFX(() -> FXUtils.installFastTooltip(btnRemove, i18n("button.delete"))); + btnRemove.setGraphic(SVG.DELETE_OUTLINE.createIcon(Theme.blackFill(), -1, -1)); + FXUtils.installFastTooltip(btnRemove, i18n("button.delete")); right.getChildren().add(btnRemove); root.setRight(right);