[bisq-network/bisq] Add "Buy BSQ" button next to trade fee selector (#5055)

Christoph Atteneder notifications at github.com
Mon Nov 8 10:12:37 CET 2021


@ripcurlx commented on this pull request.



> +
+    public static Tuple2<AutoTooltipButton, VBox> createBuyBsqButtonBox(Navigation navigation, Preferences preferences) {
+        String buyBsqText = Res.get("shared.buyCurrency", "BSQ");
+        var buyBsqButton = new AutoTooltipButton(buyBsqText);
+        buyBsqButton.getStyleClass().add("action-button");
+        buyBsqButton.setStyle("-fx-pref-height: 20; -fx-padding: 3 8 3 8; -fx-font-size: 0.769em; -fx-border-radius: 5;");
+        buyBsqButton.setOnAction(e -> new Popup().headLine(buyBsqText)
+                .information(Res.get("createOffer.buyBsq.popupMessage"))
+                .actionButtonText(buyBsqText)
+                .buttonAlignment(HPos.CENTER)
+                .onAction(() -> {
+                    preferences.setSellScreenCurrencyCode("BSQ");
+                    navigation.navigateTo(MainView.class, SellOfferView.class, OfferBookView.class);
+                }).show());
+
+        final VBox buyBsqButtonVBox = new VBox(buyBsqButton);

Good question - I inherited this part, but didn't looked in the exact necessity of this layout. I'll simplify this positioning.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5055#discussion_r744528015
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20211108/28cda4f5/attachment.htm>


More information about the bisq-github mailing list