remove extra info from next screen

This commit is contained in:
woodser 2025-05-19 13:12:29 -04:00
parent 9147a1aaf9
commit 328bda1c14
No known key found for this signature in database
GPG key ID: 55A10DD48ADEE5EF

View file

@ -127,13 +127,13 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
private GridPane gridPane; private GridPane gridPane;
private TitledGroupBg noFundingRequiredTitledGroupBg; private TitledGroupBg noFundingRequiredTitledGroupBg;
private Label noFundingRequiredLabel; private Label noFundingRequiredLabel;
private int lastGridRowNoFundingRequired; private int gridRowNoFundingRequired;
private TitledGroupBg payFundsTitledGroupBg; private TitledGroupBg payFundsTitledGroupBg;
private TitledGroupBg advancedOptionsGroup; private TitledGroupBg advancedOptionsGroup;
private VBox priceAsPercentageInputBox, amountRangeBox; private VBox priceAsPercentageInputBox, amountRangeBox;
private HBox fundingHBox, amountValueCurrencyBox, priceValueCurrencyBox, volumeValueCurrencyBox, private HBox fundingHBox, amountValueCurrencyBox, priceValueCurrencyBox, volumeValueCurrencyBox,
priceAsPercentageValueCurrencyBox, minAmountValueCurrencyBox, advancedOptionsBox, priceAsPercentageValueCurrencyBox, minAmountValueCurrencyBox, advancedOptionsBox,
takeOfferBox, buttonBox, firstRowHBox; takeOfferBox, nextButtonBox, firstRowHBox;
private ComboBox<PaymentAccount> paymentAccountsComboBox; private ComboBox<PaymentAccount> paymentAccountsComboBox;
private TextArea extraInfoTextArea; private TextArea extraInfoTextArea;
private Label amountDescriptionLabel, private Label amountDescriptionLabel,
@ -142,7 +142,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
volumeCurrencyLabel, priceDescriptionLabel, volumeDescriptionLabel, volumeCurrencyLabel, priceDescriptionLabel, volumeDescriptionLabel,
waitingForFundsLabel, offerAvailabilityLabel, priceAsPercentageDescription, waitingForFundsLabel, offerAvailabilityLabel, priceAsPercentageDescription,
tradeFeeDescriptionLabel, resultLabel, tradeFeeInXmrLabel, xLabel, tradeFeeDescriptionLabel, resultLabel, tradeFeeInXmrLabel, xLabel,
fakeXLabel; fakeXLabel, extraInfoLabel;
private InputTextField amountTextField; private InputTextField amountTextField;
private TextField paymentMethodTextField, currencyTextField, priceTextField, priceAsPercentageTextField, private TextField paymentMethodTextField, currencyTextField, priceTextField, priceAsPercentageTextField,
volumeTextField, amountRangeTextField; volumeTextField, amountRangeTextField;
@ -200,7 +200,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
createListeners(); createListeners();
addButtons(); addNextButtons();
addOfferAvailabilityLabel(); addOfferAvailabilityLabel();
addFundingGroup(); addFundingGroup();
@ -361,19 +361,26 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
if (offer.hasBuyerAsTakerWithoutDeposit() && offer.getCombinedExtraInfo() != null && !offer.getCombinedExtraInfo().isEmpty()) { if (offer.hasBuyerAsTakerWithoutDeposit() && offer.getCombinedExtraInfo() != null && !offer.getCombinedExtraInfo().isEmpty()) {
// attach extra info text area // attach extra info text area
extraInfoTextArea = addCompactTopLabelTextArea(gridPane, ++lastGridRowNoFundingRequired, Res.get("payment.shared.extraInfo.noDeposit"), "").second; //updateOfferElementsStyle();
Tuple2<Label, TextArea> extraInfoTuple = addCompactTopLabelTextArea(gridPane, ++gridRowNoFundingRequired, Res.get("payment.shared.extraInfo.noDeposit"), "");
extraInfoLabel = extraInfoTuple.first;
extraInfoLabel.setVisible(false);
extraInfoLabel.setManaged(false);
extraInfoTextArea = extraInfoTuple.second;
extraInfoTextArea.setVisible(false);
extraInfoTextArea.setManaged(false);
extraInfoTextArea.setText(offer.getCombinedExtraInfo().trim()); extraInfoTextArea.setText(offer.getCombinedExtraInfo().trim());
extraInfoTextArea.getStyleClass().add("text-area"); extraInfoTextArea.getStyleClass().add("text-area");
extraInfoTextArea.setWrapText(true); extraInfoTextArea.setWrapText(true);
extraInfoTextArea.setMaxHeight(300); extraInfoTextArea.setMaxHeight(300);
extraInfoTextArea.setEditable(false); extraInfoTextArea.setEditable(false);
GUIUtil.adjustHeightAutomatically(extraInfoTextArea); GUIUtil.adjustHeightAutomatically(extraInfoTextArea);
GridPane.setRowIndex(extraInfoTextArea, lastGridRowNoFundingRequired); GridPane.setRowIndex(extraInfoTextArea, gridRowNoFundingRequired);
GridPane.setColumnSpan(extraInfoTextArea, GridPane.REMAINING); GridPane.setColumnSpan(extraInfoTextArea, GridPane.REMAINING);
GridPane.setColumnIndex(extraInfoTextArea, 0); GridPane.setColumnIndex(extraInfoTextArea, 0);
// move up take offer buttons // move up take offer buttons
GridPane.setRowIndex(takeOfferBox, lastGridRowNoFundingRequired + 1); GridPane.setRowIndex(takeOfferBox, gridRowNoFundingRequired + 1);
GridPane.setMargin(takeOfferBox, new Insets(15, 0, 0, 0)); GridPane.setMargin(takeOfferBox, new Insets(15, 0, 0, 0));
} }
} }
@ -496,6 +503,10 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
if (model.getOffer().hasBuyerAsTakerWithoutDeposit()) { if (model.getOffer().hasBuyerAsTakerWithoutDeposit()) {
noFundingRequiredTitledGroupBg.setVisible(true); noFundingRequiredTitledGroupBg.setVisible(true);
noFundingRequiredLabel.setVisible(true); noFundingRequiredLabel.setVisible(true);
extraInfoLabel.setVisible(true);
extraInfoLabel.setManaged(true);
extraInfoTextArea.setVisible(true);
extraInfoTextArea.setManaged(true);
} else { } else {
payFundsTitledGroupBg.setVisible(true); payFundsTitledGroupBg.setVisible(true);
totalToPayTextField.setVisible(true); totalToPayTextField.setVisible(true);
@ -836,11 +847,11 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
advancedOptionsBox.getChildren().addAll(tradeFeeFieldsBox); advancedOptionsBox.getChildren().addAll(tradeFeeFieldsBox);
} }
private void addButtons() { private void addNextButtons() {
Tuple3<Button, Button, HBox> tuple = add2ButtonsWithBox(gridPane, ++gridRow, Tuple3<Button, Button, HBox> tuple = add2ButtonsWithBox(gridPane, ++gridRow,
Res.get("shared.nextStep"), Res.get("shared.cancel"), 15, true); Res.get("shared.nextStep"), Res.get("shared.cancel"), 15, true);
buttonBox = tuple.third; nextButtonBox = tuple.third;
nextButton = tuple.first; nextButton = tuple.first;
nextButton.setMaxWidth(200); nextButton.setMaxWidth(200);
@ -869,7 +880,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
offerAvailabilityBusyAnimation = new BusyAnimation(false); offerAvailabilityBusyAnimation = new BusyAnimation(false);
offerAvailabilityLabel = new AutoTooltipLabel(Res.get("takeOffer.fundsBox.isOfferAvailable")); offerAvailabilityLabel = new AutoTooltipLabel(Res.get("takeOffer.fundsBox.isOfferAvailable"));
HBox.setMargin(offerAvailabilityLabel, new Insets(6, 0, 0, 0)); HBox.setMargin(offerAvailabilityLabel, new Insets(6, 0, 0, 0));
buttonBox.getChildren().addAll(offerAvailabilityBusyAnimation, offerAvailabilityLabel); nextButtonBox.getChildren().addAll(offerAvailabilityBusyAnimation, offerAvailabilityLabel);
} }
private void addFundingGroup() { private void addFundingGroup() {
@ -889,7 +900,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
noFundingRequiredLabel.setPadding(new Insets(Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE, 0, 0, 0)); noFundingRequiredLabel.setPadding(new Insets(Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE, 0, 0, 0));
GridPane.setHalignment(noFundingRequiredLabel, HPos.LEFT); GridPane.setHalignment(noFundingRequiredLabel, HPos.LEFT);
gridPane.getChildren().add(noFundingRequiredLabel); gridPane.getChildren().add(noFundingRequiredLabel);
lastGridRowNoFundingRequired = gridRow; gridRowNoFundingRequired = gridRow;
// funding title // funding title
payFundsTitledGroupBg = addTitledGroupBg(gridPane, gridRow, 3, payFundsTitledGroupBg = addTitledGroupBg(gridPane, gridRow, 3,