From b86da3925b5aa97bba9ef1e12172d48e1f3f6ecc Mon Sep 17 00:00:00 2001 From: Devin Bileck <603793+devinbileck@users.noreply.github.com> Date: Tue, 26 Mar 2019 14:50:03 -0700 Subject: [PATCH] Show close button when creating offer without required account Issue: When attempting to create an offer without a trading account for the selected currency, a prompt is shown asking the user whether to still create an offer or to create a new account. But this prompt is missing a cancel/close button in case you don't want to do either action. And pressing Esc on the keyboard proceeds to create the account. Cause: The close button on the prompt was renamed and being used to create a new account. Fix: Use the close button as a close button and add a secondary action button to create a new account. The popup width was increased to accommodate the long button text without being truncated. --- .../bisq/desktop/main/offer/offerbook/OfferBookView.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java b/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java index 4b47cedf1c7..4ff8bce652f 100644 --- a/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java +++ b/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java @@ -408,11 +408,12 @@ private void onCreateOffer() { createOfferButton.setDisable(true); offerActionHandler.onCreateOffer(model.getSelectedTradeCurrency()); }) - .closeButtonText(Res.get("offerbook.setupNewAccount")) - .onClose(() -> { + .secondaryActionButtonText(Res.get("offerbook.setupNewAccount")) + .onSecondaryAction(() -> { navigation.setReturnPath(navigation.getCurrentPath()); navigation.navigateTo(MainView.class, AccountView.class, FiatAccountsView.class); }) + .width(725) .show(); } else if (!model.hasAcceptedArbitrators()) { new Popup<>().warning(Res.get("popup.warning.noArbitratorsAvailable")).show();