diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/BisqEasyViewUtils.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/BisqEasyViewUtils.java index 1a189e6f47..6f25729bf7 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/BisqEasyViewUtils.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/BisqEasyViewUtils.java @@ -81,7 +81,6 @@ public static StackPane getCustomPaymentMethodIcon(String customPaymentMethod) { public static HBox getPaymentAndSettlementMethodsBox(List paymentMethods, List settlementMethods) { HBox hBox = new HBox(8); - hBox.setAlignment(Pos.BOTTOM_LEFT); for (FiatPaymentMethod paymentMethod : paymentMethods) { hBox.getChildren().add(createMethodLabel(paymentMethod)); } diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/message_container/list/message_box/BubbleMessageBox.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/message_container/list/message_box/BubbleMessageBox.java index a52c4ae443..ea0745f0dc 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/message_container/list/message_box/BubbleMessageBox.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/message_container/list/message_box/BubbleMessageBox.java @@ -267,9 +267,12 @@ private HBox createAndGetAmountAndPriceBox() { } private HBox createAndGetPaymentAndSettlementMethodsBox() { - return item.isBisqEasyPublicChatMessageWithOffer() - ? BisqEasyViewUtils.getPaymentAndSettlementMethodsBox(item.getBisqEasyOfferPaymentMethods(), item.getBisqEasyOfferSettlementMethods()) - : new HBox(); + if (item.isBisqEasyPublicChatMessageWithOffer()) { + HBox hBox = BisqEasyViewUtils.getPaymentAndSettlementMethodsBox(item.getBisqEasyOfferPaymentMethods(), item.getBisqEasyOfferSettlementMethods()); + hBox.setAlignment(Pos.BOTTOM_LEFT); + return hBox; + } + return new HBox(); } private VBox createAndGetQuotedMessageBox() { diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/user/profile_card/offers/ProfileCardOffersView.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/user/profile_card/offers/ProfileCardOffersView.java index 88c6e3f2a1..427aa1f972 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/user/profile_card/offers/ProfileCardOffersView.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/user/profile_card/offers/ProfileCardOffersView.java @@ -21,6 +21,7 @@ import bisq.desktop.components.controls.BisqTooltip; import bisq.desktop.components.table.BisqTableColumn; import bisq.desktop.components.table.BisqTableView; +import bisq.desktop.main.content.bisq_easy.BisqEasyViewUtils; import bisq.desktop.main.content.bisq_easy.offerbook.offerbook_list.OfferbookListItem; import bisq.desktop.main.content.components.MarketImageComposition; import bisq.i18n.Res; @@ -96,6 +97,13 @@ private void configTableView() { .comparator(Comparator.comparing(OfferbookListItem::getPriceSpecAsPercent)) .setCellFactory(getPriceCellFactory()) .build()); + + tableView.getColumns().add(new BisqTableColumn.Builder() + .title(Res.get("user.profileCard.offers.table.columns.paymentMethods")) + .left() + .isSortable(false) + .setCellFactory(getPaymentMethodsCellFactory()) + .build()); } private Callback, @@ -151,4 +159,24 @@ protected void updateItem(OfferbookListItem item, boolean empty) { } }; } + + private Callback, + TableCell> getPaymentMethodsCellFactory() { + return column -> new TableCell<>() { + @Override + protected void updateItem(OfferbookListItem item, boolean empty) { + super.updateItem(item, empty); + + if (item != null && !empty) { + HBox paymentMethodsBox = BisqEasyViewUtils.getPaymentAndSettlementMethodsBox( + item.getFiatPaymentMethods(), item.getBitcoinPaymentMethods()); + paymentMethodsBox.setAlignment(Pos.CENTER_LEFT); + paymentMethodsBox.setPadding(new Insets(0, 10, 0, 0)); + setGraphic(paymentMethodsBox); + } else { + setGraphic(null); + } + } + }; + } }