squeeze create offer view to avoid scrolling

This commit is contained in:
woodser 2023-07-23 09:46:51 -04:00
parent 5c814700fb
commit f459666276

View File

@ -916,7 +916,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
private void addGridPane() { private void addGridPane() {
gridPane = new GridPane(); gridPane = new GridPane();
gridPane.getStyleClass().add("content-pane"); gridPane.getStyleClass().add("content-pane");
gridPane.setPadding(new Insets(30, 25, -1, 25)); gridPane.setPadding(new Insets(25, 25, -1, 25));
gridPane.setHgap(5); gridPane.setHgap(5);
gridPane.setVgap(5); gridPane.setVgap(5);
GUIUtil.setDefaultTwoColumnConstraintsForGridPane(gridPane); GUIUtil.setDefaultTwoColumnConstraintsForGridPane(gridPane);
@ -978,7 +978,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
private void addAmountPriceGroup() { private void addAmountPriceGroup() {
amountTitledGroupBg = addTitledGroupBg(gridPane, ++gridRow, 2, amountTitledGroupBg = addTitledGroupBg(gridPane, ++gridRow, 2,
Res.get("createOffer.setAmountPrice"), Layout.COMPACT_GROUP_DISTANCE); Res.get("createOffer.setAmountPrice"), 25);
GridPane.setColumnSpan(amountTitledGroupBg, 2); GridPane.setColumnSpan(amountTitledGroupBg, 2);
addAmountPriceFields(); addAmountPriceFields();
@ -1059,7 +1059,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
private void addFundingGroup() { private void addFundingGroup() {
// don't increase gridRow as we removed button when this gets visible // don't increase gridRow as we removed button when this gets visible
payFundsTitledGroupBg = addTitledGroupBg(gridPane, gridRow, 3, payFundsTitledGroupBg = addTitledGroupBg(gridPane, gridRow, 3,
Res.get("createOffer.fundsBox.title"), Layout.COMPACT_GROUP_DISTANCE); Res.get("createOffer.fundsBox.title"), 25);
payFundsTitledGroupBg.getStyleClass().add("last"); payFundsTitledGroupBg.getStyleClass().add("last");
GridPane.setColumnSpan(payFundsTitledGroupBg, 2); GridPane.setColumnSpan(payFundsTitledGroupBg, 2);
payFundsTitledGroupBg.setVisible(false); payFundsTitledGroupBg.setVisible(false);
@ -1067,6 +1067,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
totalToPayTextField = addFundsTextfield(gridPane, gridRow, totalToPayTextField = addFundsTextfield(gridPane, gridRow,
Res.get("shared.totalsNeeded"), Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE); Res.get("shared.totalsNeeded"), Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE);
totalToPayTextField.setVisible(false); totalToPayTextField.setVisible(false);
GridPane.setMargin(totalToPayTextField, new Insets(65, 10, 0, 0));
qrCodeImageView = new ImageView(); qrCodeImageView = new ImageView();
qrCodeImageView.setVisible(false); qrCodeImageView.setVisible(false);
@ -1261,7 +1262,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
firstRowHBox.getChildren().addAll(amountBox, xLabel, percentagePriceBox, resultLabel, volumeBox); firstRowHBox.getChildren().addAll(amountBox, xLabel, percentagePriceBox, resultLabel, volumeBox);
GridPane.setColumnSpan(firstRowHBox, 2); GridPane.setColumnSpan(firstRowHBox, 2);
GridPane.setRowIndex(firstRowHBox, gridRow); GridPane.setRowIndex(firstRowHBox, gridRow);
GridPane.setMargin(firstRowHBox, new Insets(Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE, 10, 0, 0)); GridPane.setMargin(firstRowHBox, new Insets(40, 10, 0, 0));
gridPane.getChildren().add(firstRowHBox); gridPane.getChildren().add(firstRowHBox);
} }