From ee45c6a2183d120608dbbda69790718827d837bd Mon Sep 17 00:00:00 2001 From: Christoph Atteneder Date: Wed, 14 Mar 2018 17:59:17 +0100 Subject: [PATCH] Align filter horizontal --- .../main/offer/offerbook/OfferBookView.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java b/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java index 7c731d7504..8152fdfc2b 100644 --- a/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java +++ b/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java @@ -55,6 +55,8 @@ import bisq.core.user.DontShowAgainLookup; import bisq.network.p2p.NodeAddress; +import bisq.common.util.Tuple3; + import org.bitcoinj.core.Coin; import com.google.inject.name.Named; @@ -73,6 +75,7 @@ import javafx.scene.control.TableView; import javafx.scene.control.Tooltip; import javafx.scene.image.ImageView; import javafx.scene.layout.GridPane; +import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; import javafx.geometry.HPos; @@ -96,6 +99,7 @@ import java.util.Comparator; import java.util.Optional; import static bisq.desktop.util.FormBuilder.addButton; +import static bisq.desktop.util.FormBuilder.addHBoxLabelComboBox; import static bisq.desktop.util.FormBuilder.addLabelComboBox; import static bisq.desktop.util.FormBuilder.addTitledGroupBg; @@ -147,12 +151,16 @@ public class OfferBookView extends ActivatableViewAndModel filterBoxTuple = addHBoxLabelComboBox(root, gridRow, Res.get("offerbook.filterByCurrency"), Layout.FIRST_ROW_DISTANCE); + final HBox filterBox = filterBoxTuple.first; + currencyComboBox = filterBoxTuple.third; currencyComboBox.setPromptText(Res.get("list.currency.select")); //noinspection unchecked - paymentMethodComboBox = addLabelComboBox(root, ++gridRow, Res.getWithCol("offerbook.filterByPaymentMethod")).second; + paymentMethodComboBox = new ComboBox<>(); + final Label paymentMethodLabel = new AutoTooltipLabel(Res.getWithCol("offerbook.filterByPaymentMethod")); + paymentMethodLabel.setPadding(new Insets(0,0,0,10)); + filterBox.getChildren().addAll(paymentMethodLabel, paymentMethodComboBox); paymentMethodComboBox.setPromptText(Res.get("shared.selectPaymentMethod")); paymentMethodComboBox.setVisibleRowCount(20); paymentMethodComboBox.setConverter(new StringConverter() {