mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Prevent overlapping of offer tools
Moves everything into box to prevent hiding of information in all languages
This commit is contained in:
parent
9041bf4938
commit
429ae08414
1 changed files with 21 additions and 18 deletions
|
@ -85,10 +85,10 @@ import javafx.scene.control.TableRow;
|
|||
import javafx.scene.control.TableView;
|
||||
import javafx.scene.control.Tooltip;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.Priority;
|
||||
import javafx.scene.layout.Region;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.text.TextAlignment;
|
||||
|
||||
|
@ -113,6 +113,8 @@ import javafx.util.StringConverter;
|
|||
import java.util.Comparator;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static bisq.desktop.util.FormBuilder.addTitledGroupBg;
|
||||
|
||||
@FxmlView
|
||||
|
@ -173,10 +175,10 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
|||
final TitledGroupBg titledGroupBg = addTitledGroupBg(root, gridRow, 2, Res.get("offerbook.availableOffers"));
|
||||
titledGroupBg.getStyleClass().add("last");
|
||||
|
||||
HBox hBox = new HBox();
|
||||
hBox.setAlignment(Pos.CENTER_LEFT);
|
||||
hBox.setSpacing(35);
|
||||
hBox.setPadding(new Insets(10, 0, 0, 0));
|
||||
HBox offerToolsBox = new HBox();
|
||||
offerToolsBox.setAlignment(Pos.CENTER_LEFT);
|
||||
offerToolsBox.setSpacing(10);
|
||||
offerToolsBox.setPadding(new Insets(10, 0, 0, 0));
|
||||
|
||||
Tuple3<VBox, Label, AutocompleteComboBox<TradeCurrency>> currencyBoxTuple = FormBuilder.addTopLabelAutocompleteComboBox(
|
||||
Res.get("offerbook.filterByCurrency"));
|
||||
|
@ -193,25 +195,19 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
|||
matchingOffersToggle.setText(Res.get("offerbook.matchingOffers"));
|
||||
HBox.setMargin(matchingOffersToggle, new Insets(7, 0, -9, -15));
|
||||
|
||||
hBox.getChildren().addAll(currencyBoxTuple.first, paymentBoxTuple.first, matchingOffersToggle);
|
||||
AnchorPane.setLeftAnchor(hBox, 0d);
|
||||
AnchorPane.setTopAnchor(hBox, 0d);
|
||||
AnchorPane.setBottomAnchor(hBox, 0d);
|
||||
|
||||
createOfferButton = new AutoTooltipButton();
|
||||
createOfferButton.setMinHeight(40);
|
||||
createOfferButton.setGraphicTextGap(10);
|
||||
AnchorPane.setRightAnchor(createOfferButton, 0d);
|
||||
AnchorPane.setBottomAnchor(createOfferButton, 0d);
|
||||
|
||||
AnchorPane anchorPane = new AnchorPane();
|
||||
anchorPane.getChildren().addAll(hBox, createOfferButton);
|
||||
offerToolsBox.getChildren().addAll(currencyBoxTuple.first, paymentBoxTuple.first,
|
||||
matchingOffersToggle, getSpacer(), createOfferButton);
|
||||
|
||||
GridPane.setHgrow(anchorPane, Priority.ALWAYS);
|
||||
GridPane.setRowIndex(anchorPane, gridRow);
|
||||
GridPane.setColumnSpan(anchorPane, 2);
|
||||
GridPane.setMargin(anchorPane, new Insets(Layout.FIRST_ROW_DISTANCE, 0, 0, 0));
|
||||
root.getChildren().add(anchorPane);
|
||||
GridPane.setHgrow(offerToolsBox, Priority.ALWAYS);
|
||||
GridPane.setRowIndex(offerToolsBox, gridRow);
|
||||
GridPane.setColumnSpan(offerToolsBox, 2);
|
||||
GridPane.setMargin(offerToolsBox, new Insets(Layout.FIRST_ROW_DISTANCE, 0, 0, 0));
|
||||
root.getChildren().add(offerToolsBox);
|
||||
|
||||
tableView = new TableView<>();
|
||||
|
||||
|
@ -1199,4 +1195,11 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
|||
});
|
||||
return column;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private Region getSpacer() {
|
||||
final Region spacer = new Region();
|
||||
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||
return spacer;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue