Skip to content

Commit

Permalink
Merge pull request #2060 from ripcurlx/fix-cash-deposit-extra-require…
Browse files Browse the repository at this point in the history
…ments-missing

Fix wrong positioning of requirements field in CashDeposit
  • Loading branch information
ManfredKarrer authored Dec 5, 2018
2 parents d0bda91 + 2b3874a commit 47a2aff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccount
addCompactTopLabelTextFieldWithCopyIcon(gridPane, getIndexOfColumn(colIndex) == 0 ? ++gridRow : gridRow, getIndexOfColumn(colIndex++), bankNameLabel, data.getBankName());

if (!bankNameBankIdCombined && !bankNameBranchIdCombined && !branchIdAccountNrCombined && bankIdBranchIdCombined) {
addCompactTopLabelTextFieldWithCopyIcon(gridPane, getIndexOfColumn(colIndex) == 0 ? ++gridRow : gridRow,
addCompactTopLabelTextFieldWithCopyIcon(gridPane, getIndexOfColumn(colIndex) == 0 ? ++gridRow : gridRow, getIndexOfColumn(colIndex++),
bankIdLabel + " / " +
branchIdLabel,
data.getBankId() + " / " + data.getBranchId());
Expand All @@ -144,7 +144,7 @@ public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccount
addCompactTopLabelTextFieldWithCopyIcon(gridPane, getIndexOfColumn(colIndex) == 0 ? ++gridRow : gridRow, getIndexOfColumn(colIndex++), branchIdLabel, data.getBranchId());

if (!branchIdAccountNrCombined && accountNrAccountTypeCombined) {
addCompactTopLabelTextFieldWithCopyIcon(gridPane, getIndexOfColumn(colIndex) == 0 ? ++gridRow : gridRow,
addCompactTopLabelTextFieldWithCopyIcon(gridPane, getIndexOfColumn(colIndex) == 0 ? ++gridRow : gridRow, getIndexOfColumn(colIndex++),
accountNrLabel + " / " + accountTypeLabel,
data.getAccountNr() + " / " + data.getAccountType());
}
Expand All @@ -162,7 +162,7 @@ public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccount
" / " + data.getAccountNr());

if (showRequirements) {
TextArea textArea = addTopLabelTextArea(gridPane, getIndexOfColumn(colIndex) == 0 ? ++gridRow : gridRow, getIndexOfColumn(colIndex++),
TextArea textArea = addCompactTopLabelTextArea(gridPane, getIndexOfColumn(colIndex) == 0 ? ++gridRow : gridRow, getIndexOfColumn(colIndex++),
Res.get("payment.extras"), "").second;
textArea.setMinHeight(45);
textArea.setMaxHeight(45);
Expand Down
5 changes: 5 additions & 0 deletions desktop/src/main/java/bisq/desktop/util/FormBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ public static Tuple2<Label, TextArea> addCompactTopLabelTextArea(GridPane gridPa
return addTopLabelTextArea(gridPane, rowIndex, title, prompt, -Layout.FLOATING_LABEL_DISTANCE);
}

public static Tuple2<Label, TextArea> addCompactTopLabelTextArea(GridPane gridPane, int rowIndex, int colIndex, String title, String prompt) {
return addTopLabelTextArea(gridPane, rowIndex, colIndex, title, prompt, -Layout.FLOATING_LABEL_DISTANCE);
}

public static Tuple2<Label, TextArea> addTopLabelTextArea(GridPane gridPane, int rowIndex, String title, String prompt) {
return addTopLabelTextArea(gridPane, rowIndex, title, prompt, 0);
}
Expand Down Expand Up @@ -1173,6 +1177,7 @@ public static Tuple2<Label, TextFieldWithCopyIcon> addTopLabelTextFieldWithCopyI
textFieldWithCopyIcon.setText(value);

final Tuple2<Label, VBox> topLabelWithVBox = addTopLabelWithVBox(gridPane, rowIndex, title, textFieldWithCopyIcon, top);
topLabelWithVBox.second.setAlignment(Pos.TOP_LEFT);
GridPane.setColumnIndex(topLabelWithVBox.second, colIndex);

return new Tuple2<>(topLabelWithVBox.first, textFieldWithCopyIcon);
Expand Down

0 comments on commit 47a2aff

Please sign in to comment.