Skip to content

Commit

Permalink
Code review suggestions from @ripcurlx
Browse files Browse the repository at this point in the history
Disable validation errors when clearing edit fields
Implement spacer field using Region
  • Loading branch information
jmacxx committed Jan 14, 2021
1 parent 27d41c8 commit 3984e8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,12 @@ private void addSendBsqGroup() {
bsqFormatter,
btcFormatter,
() -> {
receiversAddressInputTextField.setValidator(null);
receiversAddressInputTextField.setText("");
receiversAddressInputTextField.setValidator(bsqAddressValidator);
amountInputTextField.setValidator(null);
amountInputTextField.setText("");
amountInputTextField.setValidator(bsqValidator);
});
} catch (BsqChangeBelowDustException e) {
String msg = Res.get("popup.warning.bsqChangeBelowDustException", bsqFormatter.formatCoinWithCode(e.getOutputValue()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

import bisq.core.locale.Res;

import javafx.scene.control.Label;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Region;

import static bisq.desktop.util.FormBuilder.*;

Expand Down Expand Up @@ -58,7 +58,9 @@ public void show() {
protected void addContent() {
GridPane.setColumnSpan(
addMultilineLabel(gridPane, ++rowIndex, note, 0), 2);
gridPane.add(new Label(""), 0, ++rowIndex); // spacer
Region spacer = new Region();
spacer.setMinHeight(20);
gridPane.add(spacer, 0, ++rowIndex);
addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("shared.amount"), amount);
addConfirmationLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("txDetailsWindow.sentTo"), address);
txIdTextField = addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("txDetailsWindow.txId"), txId).second;
Expand Down

0 comments on commit 3984e8b

Please sign in to comment.