diff --git a/desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/MutableOfferView.java b/desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/MutableOfferView.java index 244c2f52997..af7581701aa 100644 --- a/desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/MutableOfferView.java +++ b/desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/MutableOfferView.java @@ -153,10 +153,10 @@ public abstract class MutableOfferView> exten private ComboBox paymentAccountsComboBox; private ComboBox currencyComboBox; private ImageView qrCodeImageView; - private VBox currencySelection, fixedPriceBox, percentagePriceBox, currencyTextFieldBox, triggerPriceVBox, buyBsqBox; + private VBox currencySelection, fixedPriceBox, percentagePriceBox, currencyTextFieldBox, triggerPriceVBox; private HBox fundingHBox, firstRowHBox, secondRowHBox, placeOfferBox, amountValueCurrencyBox, priceAsPercentageValueCurrencyBox, volumeValueCurrencyBox, priceValueCurrencyBox, - minAmountValueCurrencyBox, advancedOptionsBox, triggerPriceHBox; + minAmountValueCurrencyBox, advancedOptionsBox, triggerPriceHBox, buyBsqBox; private Subscription isWaitingForFundsSubscription, balanceSubscription; private ChangeListener amountFocusedListener, minAmountFocusedListener, volumeFocusedListener, @@ -1100,18 +1100,21 @@ private void addOptionsGroup() { advancedOptionsBox.setSpacing(40); GridPane.setRowIndex(advancedOptionsBox, gridRow); + GridPane.setColumnSpan(advancedOptionsBox, GridPane.REMAINING); GridPane.setColumnIndex(advancedOptionsBox, 0); GridPane.setHalignment(advancedOptionsBox, HPos.LEFT); GridPane.setMargin(advancedOptionsBox, new Insets(Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE, 0, 0, 0)); gridPane.getChildren().add(advancedOptionsBox); - Tuple2 buyBsqButtonBox = OfferViewUtil.createBuyBsqButtonBox( + Tuple2 buyBsqButtonBox = OfferViewUtil.createBuyBsqButtonBox( navigation, preferences); buyBsqBox = buyBsqButtonBox.second; buyBsqBox.setManaged(false); buyBsqBox.setVisible(false); - advancedOptionsBox.getChildren().addAll(getBuyerSecurityDepositBox(), getTradeFeeFieldsBox(), buyBsqBox); + VBox tradeFeeFieldsBox = getTradeFeeFieldsBox(); + tradeFeeFieldsBox.setMinWidth(240); + advancedOptionsBox.getChildren().addAll(getBuyerSecurityDepositBox(), tradeFeeFieldsBox, buyBsqBox); Tuple2 tuple = add2ButtonsAfterGroup(gridPane, ++gridRow, Res.get("shared.nextStep"), Res.get("shared.cancel")); diff --git a/desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/OfferViewUtil.java b/desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/OfferViewUtil.java index 2558c62a455..712a8fdd20b 100644 --- a/desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/OfferViewUtil.java +++ b/desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/OfferViewUtil.java @@ -36,7 +36,6 @@ import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; -import javafx.scene.layout.VBox; import javafx.geometry.HPos; import javafx.geometry.Insets; @@ -85,12 +84,13 @@ public static void addPayInfoEntry(GridPane infoGridPane, int row, String labelT infoGridPane.getChildren().addAll(label, textField); } - public static Tuple2 createBuyBsqButtonBox(Navigation navigation, + public static Tuple2 createBuyBsqButtonBox(Navigation navigation, Preferences preferences) { String buyBsqText = Res.get("shared.buyCurrency", "BSQ"); var buyBsqButton = new AutoTooltipButton(buyBsqText); buyBsqButton.getStyleClass().add("action-button"); buyBsqButton.getStyleClass().add("tiny-button"); + buyBsqButton.setMinWidth(60); buyBsqButton.setOnAction(e -> openBuyBsqOfferBook(navigation, preferences) ); @@ -101,17 +101,14 @@ public static Tuple2 createBuyBsqButtonBox(Navigation n .actionButtonText(buyBsqText) .buttonAlignment(HPos.CENTER) .onAction(() -> openBuyBsqOfferBook(navigation, preferences)).show()); + learnMore.setMinWidth(100); - final HBox buyBsqBox = new HBox(buyBsqButton, info, learnMore); + HBox buyBsqBox = new HBox(buyBsqButton, info, learnMore); buyBsqBox.setAlignment(Pos.BOTTOM_LEFT); buyBsqBox.setSpacing(10); + buyBsqBox.setPadding(new Insets(0, 0, 4, -20)); - final VBox buyBsqButtonVBox = new VBox(buyBsqBox); - buyBsqButtonVBox.setAlignment(Pos.BOTTOM_LEFT); - buyBsqButtonVBox.setPadding(new Insets(0, 0, 0, -20)); - VBox.setMargin(buyBsqButton, new Insets(0, 0, 4, 0)); - - return new Tuple2<>(buyBsqButton, buyBsqButtonVBox); + return new Tuple2<>(buyBsqButton, buyBsqBox); } private static void openBuyBsqOfferBook(Navigation navigation, Preferences preferences) { diff --git a/desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferView.java b/desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferView.java index 520eb9d9f3e..21a08d06e35 100644 --- a/desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferView.java +++ b/desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferView.java @@ -132,10 +132,10 @@ public class TakeOfferView extends ActivatableViewAndModel paymentAccountsComboBox; private Label amountDescriptionLabel, paymentMethodLabel, @@ -878,18 +878,21 @@ private void addOptionsGroup() { advancedOptionsBox.setSpacing(40); GridPane.setRowIndex(advancedOptionsBox, gridRow); + GridPane.setColumnSpan(advancedOptionsBox, GridPane.REMAINING); GridPane.setColumnIndex(advancedOptionsBox, 0); GridPane.setHalignment(advancedOptionsBox, HPos.LEFT); GridPane.setMargin(advancedOptionsBox, new Insets(Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE, 0, 0, 0)); gridPane.getChildren().add(advancedOptionsBox); - Tuple2 buyBsqButtonBox = OfferViewUtil.createBuyBsqButtonBox( + Tuple2 buyBsqButtonBox = OfferViewUtil.createBuyBsqButtonBox( navigation, model.dataModel.preferences); buyBsqBox = buyBsqButtonBox.second; buyBsqBox.setManaged(false); buyBsqBox.setVisible(false); - advancedOptionsBox.getChildren().addAll(getTradeFeeFieldsBox(), buyBsqBox); + VBox tradeFeeFieldsBox = getTradeFeeFieldsBox(); + tradeFeeFieldsBox.setMinWidth(240); + advancedOptionsBox.getChildren().addAll(tradeFeeFieldsBox, buyBsqBox); } private void addButtons() {