Merge pull request #6 from ripcurlx/fix-scrolling-in-trade-view

Reduce table height and update height calculation to prevent scrolling
This commit is contained in:
Manfred Karrer 2019-04-15 08:31:39 -05:00 committed by GitHub
commit b8b2e8b2bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -342,8 +342,8 @@ public class TradesChartsView extends ActivatableViewAndModel<VBox, TradesCharts
}
});
priceChart.setId("price-chart");
priceChart.setMinHeight(198);
priceChart.setPrefHeight(198);
priceChart.setMinHeight(178);
priceChart.setPrefHeight(178);
priceChart.setMaxHeight(300);
priceChart.setLegendVisible(false);
priceChart.setPadding(new Insets(0));
@ -398,8 +398,8 @@ public class TradesChartsView extends ActivatableViewAndModel<VBox, TradesCharts
//noinspection unchecked
volumeChart.setId("volume-chart");
volumeChart.setData(FXCollections.observableArrayList(volumeSeries));
volumeChart.setMinHeight(148);
volumeChart.setPrefHeight(148);
volumeChart.setMinHeight(128);
volumeChart.setPrefHeight(128);
volumeChart.setMaxHeight(200);
volumeChart.setLegendVisible(false);
volumeChart.setPadding(new Insets(0));
@ -517,7 +517,7 @@ public class TradesChartsView extends ActivatableViewAndModel<VBox, TradesCharts
private void createTable() {
tableView = new TableView<>();
tableView.setMinHeight(130);
tableView.setMinHeight(120);
tableView.setPrefHeight(130);
VBox.setVgrow(tableView, Priority.ALWAYS);
@ -732,9 +732,9 @@ public class TradesChartsView extends ActivatableViewAndModel<VBox, TradesCharts
else
available = root.getHeight();
available = available - volumeChart.getHeight() - toolBox.getHeight() - nrOfTradeStatisticsLabel.getHeight() - 65;
available = available - volumeChartPane.getHeight() - toolBox.getHeight() - nrOfTradeStatisticsLabel.getHeight() - 75;
if (priceChart.isManaged())
available = available - priceChart.getHeight();
available = available - priceChartPane.getHeight();
else
available = available + 10;
tableView.setPrefHeight(available);