[bisq-network/bisq] Add "Buy BSQ" button next to trade fee selector (#5055)
chimp1984
notifications at github.com
Fri Nov 5 01:42:43 CET 2021
@chimp1984 approved this pull request.
utACK
> +
+ 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);
Why a VBox is created if there is only one element in it?
The `final` in local variables should not be used (I know much of old code have it as well, but current code style suggest to not use it as unnecessary verbose).
--
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#pullrequestreview-563208048
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20211104/d69cebb3/attachment-0001.htm>
More information about the bisq-github
mailing list