From 07079ee2957936182cf5810714734683a8152777 Mon Sep 17 00:00:00 2001 From: huangyuhui Date: Mon, 3 Sep 2018 12:10:46 +0800 Subject: [PATCH] Fix image mis-positioned in AccountAdvancedListItem --- .../org/jackhuang/hmcl/ui/account/AccountAdvancedListItem.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountAdvancedListItem.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountAdvancedListItem.java index ce968e09b..f78f30212 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountAdvancedListItem.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountAdvancedListItem.java @@ -39,11 +39,13 @@ public class AccountAdvancedListItem extends AdvancedListItem { titleProperty().set(i18n("account.missing")); subtitleProperty().set(i18n("account.missing.add")); imageProperty().set(new Image("/assets/img/craft_table.png")); + viewportProperty().set(null); } else { titleProperty().set(account.getCharacter()); subtitleProperty().set(accountSubtitle(account)); imageProperty().set(AccountHelper.getDefaultSkin(account.getUUID(), 4)); + viewportProperty().set(AccountHelper.getViewport(4)); if (account instanceof YggdrasilAccount) { AccountHelper.loadSkinAsync((YggdrasilAccount) account).subscribe(Schedulers.javafx(), () -> { @@ -56,7 +58,6 @@ public class AccountAdvancedListItem extends AdvancedListItem { }; public AccountAdvancedListItem() { - viewportProperty().set(AccountHelper.getViewport(4)); } public ObjectProperty accountProperty() {