Skip to content

Commit

Permalink
Merge pull request #2508 from axpoems/update-payment-methods-icons
Browse files Browse the repository at this point in the history
Update payment methods icons
  • Loading branch information
djing-chan authored Jul 28, 2024
2 parents 96b0466 + c7e0872 commit 973a868
Show file tree
Hide file tree
Showing 66 changed files with 44 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
import javafx.scene.control.Tooltip;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import lombok.extern.slf4j.Slf4j;

import javax.annotation.Nullable;
Expand All @@ -51,6 +53,7 @@ public ChipButton(String text) {
toggleButton.setText(text);
toggleButton.setMouseTransparent(true);
toggleButton.setAlignment(Pos.CENTER_LEFT);
VBox.setVgrow(toggleButton, Priority.ALWAYS);
getChildren().add(toggleButton);

toggleButton.selectedProperty().addListener(new WeakReference<ChangeListener<Boolean>>((observable, oldValue, newValue) -> {
Expand Down Expand Up @@ -86,7 +89,6 @@ public ChipButton(String text) {
getStyleClass().add("chips-button-selected");
}
});

}

private void removeStyles() {
Expand Down Expand Up @@ -121,14 +123,13 @@ public Label setRightIcon(AwesomeIcon awesomeIcon) {
public ImageView setRightIcon(String iconId) {
ImageView imageView = ImageUtil.getImageViewById(iconId);
imageView.setCursor(Cursor.HAND);
HBox.setMargin(imageView, new Insets(0, -5, 0, 20));
HBox.setMargin(imageView, new Insets(0, 5, 0, 0));
getChildren().addAll(Spacer.fillHBox(), imageView);
return imageView;
}

public void setSelected(boolean value) {
toggleButton.setSelected(value);

}

public boolean isSelected() {
Expand All @@ -138,4 +139,4 @@ public boolean isSelected() {
public void setOnAction(Runnable onActionHandler) {
this.onActionHandler = onActionHandler;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public class AddCustomPaymentMethodBox extends HBox {
private final Button addIconButton;
private final ImageView addIcon;
private final ChangeListener<Boolean> focusedListener;
private final String defaultIconId = "add-white";
private final String activeIconId = "add";
private final String defaultIconId = "add-custom-grey";
private final String activeIconId = "add-custom-green";

public AddCustomPaymentMethodBox() {
customPaymentMethodField = new TextField();
Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/desktop/src/main/resources/css/bisq_easy.css
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,8 @@
.bisq-easy-trade-wizard-payment-methods-step .add-custom-payment-method-box {
-fx-alignment: center-left;
-fx-background-color: -bisq-dark-grey-50;
-fx-background-radius: 32;
-fx-padding: 4;
-fx-background-radius: 9;
-fx-padding: 5 5 5 6;
-fx-spacing: 7;
}

Expand Down
6 changes: 3 additions & 3 deletions apps/desktop/desktop/src/main/resources/css/controls.css
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,13 @@

.chips-button {
-fx-background-color: rgba(255, 255, 255, 0.1);
-fx-background-radius: 32;
-fx-background-radius: 9;
-fx-text-fill: -fx-light-text-color;
-fx-font-size: 1em;
-fx-font-family: "IBM Plex Sans";
-fx-border-width: 0;
-fx-cursor: hand;
-fx-padding: 5 10 5 6;
-fx-padding: 5 0 5 7;
}

.chips-button-hover {
Expand Down Expand Up @@ -364,7 +364,7 @@
.chips-button > .toggle-button:disabled,
.chips-button > .toggle-button:disabled:hover {
-fx-background-color: transparent;
-fx-padding: 0 20 0 10;
-fx-padding: 0 0 0 10;
}


Expand Down
51 changes: 30 additions & 21 deletions apps/desktop/desktop/src/main/resources/css/images.css
Original file line number Diff line number Diff line change
Expand Up @@ -528,89 +528,98 @@
/* Fiat payment methods based on enum names from FiatPaymentRailUtil */

#SEPA {
-fx-image: url("/images/payment/SEPA.png");
-fx-image: url("/images/payment/sepa.png");
}

#SEPA_INSTANT {
-fx-image: url("/images/payment/SEPA.png");
-fx-image: url("/images/payment/sepa-instant.png");
}

#ZELLE {
-fx-image: url("/images/payment/Zelle.png");
-fx-image: url("/images/payment/zelle.png");
}

#REVOLUT {
-fx-image: url("/images/payment/Revolut.png");
-fx-image: url("/images/payment/revolut.png");
}

#WISE {
-fx-image: url("/images/payment/Wise.png");
-fx-image: url("/images/payment/wise.png");
}

#NATIONAL_BANK {
-fx-image: url("/images/payment/NationalBankTransfer.png");
-fx-image: url("/images/payment/national-bank-transfer.png");
}

#SWIFT {
-fx-image: url("/images/payment/NationalBankTransfer.png");
-fx-image: url("/images/payment/swift.png");
}

#F2F {
-fx-image: url("/images/payment/F2F.png");
-fx-image: url("/images/payment/f2f.png");
}

#ACH_TRANSFER {
-fx-image: url("/images/payment/ACH.png");
-fx-image: url("/images/payment/ach.png");
}

#PIX {
-fx-image: url("/images/payment/Pix.png");
-fx-image: url("/images/payment/pix.png");
}

#FASTER_PAYMENTS {
-fx-image: url("/images/payment/FasterPayments.png");
-fx-image: url("/images/payment/faster-payments.png");
}

#PAY_ID {
-fx-image: url("/images/payment/PayID.png");
-fx-image: url("/images/payment/pay-id.png");
}

#US_POSTAL_MONEY_ORDER {
-fx-image: url("/images/payment/USPostalMoneyOrder.png");
-fx-image: url("/images/payment/uspmo.png");
}

#CASH_BY_MAIL {
-fx-image: url("/images/payment/CashByMail.png");
-fx-image: url("/images/payment/cash-by-mail.png");
}

#STRIKE {
-fx-image: url("/images/payment/Strike.png");
-fx-image: url("/images/payment/strike.png");
}

#INTERAC_E_TRANSFER {
-fx-image: url("/images/payment/InteracETransfer.png");
-fx-image: url("/images/payment/interac-etransfer.png");
}

#AMAZON_GIFT_CARD {
-fx-image: url("/images/payment/Amazon.png");
-fx-image: url("/images/payment/amazon.png");
}

#CASH_DEPOSIT {
-fx-image: url("/images/payment/CashDeposit.png");
-fx-image: url("/images/payment/cash-deposit.png");
}

#UPI {
-fx-image: url("/images/payment/Upi.png");
-fx-image: url("/images/payment/upi.png");
}

#BIZUM {
-fx-image: url("/images/payment/Bizum.png");
-fx-image: url("/images/payment/bizum.png");
}

#CASH_APP {
-fx-image: url("/images/payment/CashApp.png");
-fx-image: url("/images/payment/cashapp.png");
}

#add-custom-green {
-fx-image: url("/images/payment/add-custom-green.png");
}

#add-custom-grey {
-fx-image: url("/images/payment/add-custom-grey.png");
}


/* Bitcoin payment method icons based on enum names from BitcoinPaymentRail */

#MAIN_CHAIN {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/desktop/desktop/src/main/resources/images/payment/Bizum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified apps/desktop/desktop/src/main/resources/images/payment/F2F.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified apps/desktop/desktop/src/main/resources/images/payment/Pix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/desktop/desktop/src/main/resources/images/payment/SEPA.png
Binary file modified apps/desktop/desktop/src/main/resources/images/payment/Strike.png
Diff not rendered.
Diff not rendered.
Binary file modified apps/desktop/desktop/src/main/resources/images/payment/Upi.png
Binary file modified apps/desktop/desktop/src/main/resources/images/payment/Wise.png
4 changes: 2 additions & 2 deletions i18n/src/main/resources/bisq_easy.properties
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ bisqEasy.component.amount.baseSide.tooltip.taker.offerPrice=with the offer price
# Create offer / Payment methods
################################################################################

bisqEasy.tradeWizard.paymentMethod.headline.buyer=How do you want to transfer the {0}
bisqEasy.tradeWizard.paymentMethod.headline.seller=How do you want to receive the {0}
bisqEasy.tradeWizard.paymentMethod.headline.buyer=How do you want to transfer the {0}?
bisqEasy.tradeWizard.paymentMethod.headline.seller=How do you want to receive the {0}?
bisqEasy.tradeWizard.paymentMethod.subTitle=Choose your payment methods.
bisqEasy.tradeWizard.paymentMethod.noneFound=For the selected market there are no default payment methods provided.\n\
Please add in the text field below the custom payment you want to use.
Expand Down

0 comments on commit 973a868

Please sign in to comment.