From 63f54e8d1bfb3f14c33c7adb5a300510d4623d85 Mon Sep 17 00:00:00 2001 From: preland <89992615+preland@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:05:37 -0600 Subject: [PATCH] fixed it --- .../java/haveno/desktop/main/MainView.java | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/desktop/src/main/java/haveno/desktop/main/MainView.java b/desktop/src/main/java/haveno/desktop/main/MainView.java index 7290f76810..43ba0269cc 100644 --- a/desktop/src/main/java/haveno/desktop/main/MainView.java +++ b/desktop/src/main/java/haveno/desktop/main/MainView.java @@ -208,18 +208,18 @@ public class MainView extends InitializableView { }); - Tuple2, VBox> marketPriceBox = getMarketPriceBox(); - ComboBox priceComboBox = marketPriceBox.first; + //Tuple2, VBox> marketPriceBox = getMarketPriceBox(); + //ComboBox priceComboBox = marketPriceBox.first; - priceComboBox.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> - model.setPriceFeedComboBoxItem(newValue)); - ChangeListener selectedPriceFeedItemListener = (observable, oldValue, newValue) -> { - if (newValue != null) - priceComboBox.getSelectionModel().select(newValue); + //priceComboBox.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> + //model.setPriceFeedComboBoxItem(newValue)); + //ChangeListener selectedPriceFeedItemListener = (observable, oldValue, newValue) -> { + //if (newValue != null) + //priceComboBox.getSelectionModel().select(newValue); - }; - model.getSelectedPriceFeedComboBoxItemProperty().addListener(selectedPriceFeedItemListener); - priceComboBox.setItems(model.getPriceFeedComboBoxItems()); + //}; + //model.getSelectedPriceFeedComboBoxItemProperty().addListener(selectedPriceFeedItemListener); + //priceComboBox.setItems(model.getPriceFeedComboBoxItems()); Tuple2 availableBalanceBox = getBalanceBox(Res.get("mainView.balance.available")); availableBalanceBox.first.textProperty().bind(model.getAvailableBalance()); @@ -311,16 +311,16 @@ public class MainView extends InitializableView { secondaryNav.setAlignment(Pos.CENTER); - HBox priceAndBalance = new HBox(marketPriceBox.second, getNavigationSeparator(), availableBalanceBox.second, - getNavigationSeparator(), pendingBalanceBox.second, getNavigationSeparator(), reservedBalanceBox.second); - priceAndBalance.setMaxHeight(41); + //HBox priceAndBalance = new HBox(marketPriceBox.second, getNavigationSeparator(), availableBalanceBox.second, + //getNavigationSeparator(), pendingBalanceBox.second, getNavigationSeparator(), reservedBalanceBox.second); + //priceAndBalance.setMaxHeight(41); - priceAndBalance.setAlignment(Pos.CENTER); - priceAndBalance.setSpacing(9); - priceAndBalance.getStyleClass().add("nav-price-balance"); + //priceAndBalance.setAlignment(Pos.CENTER); + //priceAndBalance.setSpacing(9); + //priceAndBalance.getStyleClass().add("nav-price-balance"); - HBox navPane = new HBox(primaryNav, secondaryNav, getNavigationSpacer(), - priceAndBalance) {{ + HBox navPane = new HBox(primaryNav, secondaryNav, getNavigationSpacer() + ) {{ setLeftAnchor(this, 0d); setRightAnchor(this, 0d); setTopAnchor(this, 0d); @@ -437,35 +437,35 @@ public class MainView extends InitializableView { }; } - private Tuple2, VBox> getMarketPriceBox() { - - VBox marketPriceBox = new VBox(); - marketPriceBox.setAlignment(Pos.CENTER_LEFT); - - ComboBox priceComboBox = new JFXComboBox<>(); - priceComboBox.setVisibleRowCount(12); - priceComboBox.setFocusTraversable(false); - priceComboBox.setId("price-feed-combo"); - priceComboBox.setPadding(new Insets(0, -4, -4, 0)); - priceComboBox.setCellFactory(p -> getPriceFeedComboBoxListCell()); - ListCell buttonCell = getPriceFeedComboBoxListCell(); - buttonCell.setId("price-feed-combo"); - priceComboBox.setButtonCell(buttonCell); - - Label marketPriceLabel = new Label(); - - updateMarketPriceLabel(marketPriceLabel); - - marketPriceLabel.getStyleClass().add("nav-balance-label"); - marketPriceLabel.setPadding(new Insets(-2, 0, 4, 9)); - - marketPriceBox.getChildren().addAll(priceComboBox, marketPriceLabel); - - model.getMarketPriceUpdated().addListener((observable, oldValue, newValue) -> - updateMarketPriceLabel(marketPriceLabel)); - - return new Tuple2<>(priceComboBox, marketPriceBox); - } + //private Tuple2, VBox> getMarketPriceBox() { + // + // VBox marketPriceBox = new VBox(); + // marketPriceBox.setAlignment(Pos.CENTER_LEFT); + // + // ComboBox priceComboBox = new JFXComboBox<>(); + // priceComboBox.setVisibleRowCount(12); + // priceComboBox.setFocusTraversable(false); + // priceComboBox.setId("price-feed-combo"); + // priceComboBox.setPadding(new Insets(0, -4, -4, 0)); + // priceComboBox.setCellFactory(p -> getPriceFeedComboBoxListCell()); + // ListCell buttonCell = getPriceFeedComboBoxListCell(); + // buttonCell.setId("price-feed-combo"); + // priceComboBox.setButtonCell(buttonCell); + // + // Label marketPriceLabel = new Label(); + // + // updateMarketPriceLabel(marketPriceLabel); + // + // marketPriceLabel.getStyleClass().add("nav-balance-label"); + // marketPriceLabel.setPadding(new Insets(-2, 0, 4, 9)); + // + // marketPriceBox.getChildren().addAll(priceComboBox, marketPriceLabel); + // + // model.getMarketPriceUpdated().addListener((observable, oldValue, newValue) -> + // updateMarketPriceLabel(marketPriceLabel)); + // + // return new Tuple2<>(priceComboBox, marketPriceBox); + //} @NotNull private String getPriceProvider() {