Skip to content

Commit

Permalink
Merge pull request #3823 from chimp1984/fix-dao-tables-resizing
Browse files Browse the repository at this point in the history
Make all DAO screen tables resize to max. screen height
  • Loading branch information
ripcurlx authored Jan 2, 2020
2 parents 3a74e74 + 3781eb0 commit 91774c6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
import bisq.core.util.FormattingUtils;
import bisq.core.util.coin.BsqFormatter;
import bisq.core.util.ParsingUtils;
import bisq.core.util.coin.BsqFormatter;
import bisq.core.util.coin.CoinFormatter;

import bisq.common.app.DevEnv;
Expand Down Expand Up @@ -195,7 +195,7 @@ protected void activate() {
});

updateList();
GUIUtil.setFitToRowsForTableView(tableView, 41, 28, 2, 10);
GUIUtil.setFitToRowsForTableView(tableView, 41, 28, 2, 100);
updateButtonState();

feeAmountInputTextField.resetValidation();
Expand Down Expand Up @@ -273,7 +273,7 @@ private void updateList() {
.map(statefulAsset -> new AssetListItem(statefulAsset, bsqFormatter))
/*.sorted(Comparator.comparing(AssetListItem::getNameAndCode))*/
.collect(Collectors.toList()));
GUIUtil.setFitToRowsForTableView(tableView, 41, 28, 2, 10);
GUIUtil.setFitToRowsForTableView(tableView, 41, 28, 2, 100);
}

private void updateButtonState() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
import bisq.core.locale.Res;
import bisq.core.user.Preferences;
import bisq.core.util.FormattingUtils;
import bisq.core.util.coin.BsqFormatter;
import bisq.core.util.ParsingUtils;
import bisq.core.util.coin.BsqFormatter;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;

Expand Down Expand Up @@ -191,7 +191,7 @@ protected void activate() {

updateList();
GUIUtil.setFitToRowsForTableView(myItemsTableView, 41, 28, 2, 4);
GUIUtil.setFitToRowsForTableView(allTxsTableView, 41, 28, 2, 10);
GUIUtil.setFitToRowsForTableView(allTxsTableView, 41, 28, 2, 100);
updateButtonState();
}

Expand Down Expand Up @@ -271,7 +271,7 @@ private void updateList() {
allItemsObservableList.setAll(proofOfBurnService.getProofOfBurnTxList().stream()
.map(tx -> new ProofOfBurnListItem(tx, proofOfBurnService, bsqFormatter))
.collect(Collectors.toList()));
GUIUtil.setFitToRowsForTableView(allTxsTableView, 41, 28, 2, 10);
GUIUtil.setFitToRowsForTableView(allTxsTableView, 41, 28, 2, 100);
}

private void updateButtonState() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
import javafx.scene.control.TextArea;
import javafx.scene.control.Tooltip;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;

import javafx.geometry.HPos;
import javafx.geometry.Insets;
Expand Down Expand Up @@ -460,10 +461,13 @@ private void createCyclesTable() {
GridPane.setRowIndex(cyclesTableView, gridRow);
GridPane.setMargin(cyclesTableView, new Insets(Layout.FIRST_ROW_AND_GROUP_DISTANCE, -10, -15, -10));
GridPane.setColumnSpan(cyclesTableView, 2);
GridPane.setVgrow(cyclesTableView, Priority.SOMETIMES);
root.getChildren().add(cyclesTableView);

cyclesTableView.setItems(sortedCycleListItemList);
sortedCycleListItemList.comparatorProperty().bind(cyclesTableView.comparatorProperty());


}


Expand All @@ -487,6 +491,7 @@ private void createProposalsTable() {
GridPane.setRowIndex(proposalsTableView, gridRow);
GridPane.setMargin(proposalsTableView, new Insets(Layout.FIRST_ROW_AND_GROUP_DISTANCE, -10, 0, -10));
GridPane.setColumnSpan(proposalsTableView, 2);
GridPane.setVgrow(proposalsTableView, Priority.ALWAYS);
root.getChildren().add(proposalsTableView);

proposalsTableView.setItems(sortedProposalList);
Expand All @@ -513,7 +518,7 @@ private void createProposalsTable() {
isVoteIncludedInResult,
bsqFormatter))
.collect(Collectors.toList()));
GUIUtil.setFitToRowsForTableView(proposalsTableView, 25, 28, 6, 6);
GUIUtil.setFitToRowsForTableView(proposalsTableView, 25, 28, 6, 100);
}

///////////////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 91774c6

Please sign in to comment.