From 2e77bb4ab2ff1cee3d8afaab359d862ff26be035 Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Thu, 9 Nov 2023 18:30:07 +0100 Subject: [PATCH] Improve final step UI screen in BisqEasy trade Resolve #1186 --- .../trade_state/states/BaseState.java | 13 +++++++++++++ .../trade_state/states/BuyerState5.java | 5 +++-- .../trade_state/states/SellerState5.java | 5 +++-- desktop/src/main/resources/css/images.css | 4 ++++ .../images/waitingstates/complete-trade.png | Bin 0 -> 1838 bytes .../images/waitingstates/complete-trade@2x.png | Bin 0 -> 4492 bytes 6 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 desktop/src/main/resources/images/waitingstates/complete-trade.png create mode 100644 desktop/src/main/resources/images/waitingstates/complete-trade@2x.png diff --git a/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/states/BaseState.java b/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/states/BaseState.java index 3fd8fbf945..05860f75b7 100644 --- a/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/states/BaseState.java +++ b/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/states/BaseState.java @@ -26,6 +26,7 @@ import bisq.common.monetary.Coin; import bisq.common.monetary.Fiat; import bisq.desktop.ServiceProvider; +import bisq.desktop.common.utils.ImageUtil; import bisq.desktop.components.controls.WrappingText; import bisq.desktop.main.content.bisq_easy.components.WaitingAnimation; import bisq.offer.bisq_easy.BisqEasyOffer; @@ -34,6 +35,7 @@ import bisq.trade.bisq_easy.BisqEasyTradeService; import bisq.user.identity.UserIdentityService; import javafx.geometry.Pos; +import javafx.scene.image.ImageView; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import lombok.Getter; @@ -144,5 +146,16 @@ protected HBox createWaitingInfo(WaitingAnimation animation, WrappingText headli waitingInfo.setSpacing(20); return waitingInfo; } + + protected HBox createCompleteTradeInfo(WrappingText headline) { + ImageView tradeCompletedIcon = ImageUtil.getImageViewById("complete-trade"); + tradeCompletedIcon.setFitHeight(78); + tradeCompletedIcon.setFitWidth(78); + VBox text = new VBox(headline); + text.setAlignment(Pos.CENTER_LEFT); + HBox completeTradeInfo = new HBox(tradeCompletedIcon, text); + completeTradeInfo.setSpacing(20); + return completeTradeInfo; + } } } diff --git a/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/states/BuyerState5.java b/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/states/BuyerState5.java index 343570a4d4..4c6959e641 100644 --- a/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/states/BuyerState5.java +++ b/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/states/BuyerState5.java @@ -127,10 +127,11 @@ private View(Model model, Controller controller) { super(model, controller); WrappingText headline = FormUtils.getHeadline(Res.get("bisqEasy.tradeState.info.buyer.phase5.headline")); + HBox completeTradeInfo = createCompleteTradeInfo(headline); exportButton = new Button(Res.get("bisqEasy.tradeState.info.phase5.exportTrade")); leaveButton = new Button(Res.get("bisqEasy.tradeState.info.phase5.leaveChannel")); - leaveButton.getStyleClass().add("outlined-button"); + leaveButton.setDefaultButton(true); quoteAmount = FormUtils.getTextField(Res.get("bisqEasy.tradeState.info.buyer.phase5.quoteAmount"), "", false); baseAmount = FormUtils.getTextField(Res.get("bisqEasy.tradeState.info.buyer.phase5.baseAmount"), "", false); @@ -143,7 +144,7 @@ private View(Model model, Controller controller) { VBox.setMargin(headline, new Insets(0, 0, 5, 0)); VBox.setMargin(buttons, new Insets(5, 0, 5, 0)); root.getChildren().addAll( - headline, + completeTradeInfo, quoteAmount, baseAmount, txId, diff --git a/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/states/SellerState5.java b/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/states/SellerState5.java index e6e3ff7393..78958af300 100644 --- a/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/states/SellerState5.java +++ b/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/states/SellerState5.java @@ -127,10 +127,11 @@ private View(Model model, Controller controller) { super(model, controller); WrappingText headline = FormUtils.getHeadline(Res.get("bisqEasy.tradeState.info.seller.phase5.headline")); + HBox completeTradeInfo = createCompleteTradeInfo(headline); exportButton = new Button(Res.get("bisqEasy.tradeState.info.phase5.exportTrade")); leaveButton = new Button(Res.get("bisqEasy.tradeState.info.phase5.leaveChannel")); - leaveButton.getStyleClass().add("outlined-button"); + leaveButton.setDefaultButton(true); quoteAmount = FormUtils.getTextField(Res.get("bisqEasy.tradeState.info.seller.phase5.quoteAmount"), "", false); baseAmount = FormUtils.getTextField(Res.get("bisqEasy.tradeState.info.seller.phase5.baseAmount"), "", false); @@ -143,7 +144,7 @@ private View(Model model, Controller controller) { VBox.setMargin(headline, new Insets(0, 0, 5, 0)); VBox.setMargin(buttons, new Insets(5, 0, 5, 0)); root.getChildren().addAll( - headline, + completeTradeInfo, quoteAmount, baseAmount, txId, diff --git a/desktop/src/main/resources/css/images.css b/desktop/src/main/resources/css/images.css index 5a39a02c8e..3d3d4490ff 100644 --- a/desktop/src/main/resources/css/images.css +++ b/desktop/src/main/resources/css/images.css @@ -162,6 +162,10 @@ -fx-image: url("/images/waitingstates/bitcoin-confirmation.png"); } +#complete-trade { + -fx-image: url("/images/waitingstates/complete-trade.png"); +} + #video { -fx-image: url("/images/video.png"); } diff --git a/desktop/src/main/resources/images/waitingstates/complete-trade.png b/desktop/src/main/resources/images/waitingstates/complete-trade.png new file mode 100644 index 0000000000000000000000000000000000000000..0704f0193da65bf242ede6e61b14896acfec62b6 GIT binary patch literal 1838 zcmV+}2hsS6P)1^@s6$I7^K0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU&&`Cr=RCwCtoC$0cRUF1&O92aLybx)j z)DS@-M#^Q4seo6+i&z9}P^m{$O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