mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-05 05:46:44 +00:00
set tx hex divider lower when window height is reduced
This commit is contained in:
parent
d836eb515e
commit
650c3657a5
3 changed files with 8 additions and 5 deletions
|
@ -21,6 +21,7 @@ import javafx.beans.value.ObservableValue;
|
|||
import javafx.concurrent.ScheduledService;
|
||||
import javafx.concurrent.Worker;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Alert;
|
||||
|
@ -278,6 +279,10 @@ public class AppServices {
|
|||
}
|
||||
}
|
||||
|
||||
public static boolean isReducedWindowHeight(Node node) {
|
||||
return (node.getScene() != null && node.getScene().getWindow().getHeight() < 768);
|
||||
}
|
||||
|
||||
public MainApp getApplication() {
|
||||
return application;
|
||||
}
|
||||
|
|
|
@ -408,17 +408,13 @@ public class TransactionDiagram extends GridPane {
|
|||
}
|
||||
|
||||
public double getDiagramHeight() {
|
||||
if(isReducedHeight()) {
|
||||
if(AppServices.isReducedWindowHeight(this)) {
|
||||
return DIAGRAM_HEIGHT - 40;
|
||||
}
|
||||
|
||||
return DIAGRAM_HEIGHT;
|
||||
}
|
||||
|
||||
private boolean isReducedHeight() {
|
||||
return (this.getScene() != null && this.getScene().getWindow().getHeight() < 768);
|
||||
}
|
||||
|
||||
private Node createSpacer() {
|
||||
final Region spacer = new Region();
|
||||
VBox.setVgrow(spacer, Priority.ALWAYS);
|
||||
|
|
|
@ -76,6 +76,8 @@ public class TransactionController implements Initializable {
|
|||
} else if(TransactionView.OUTPUT.equals(initialView) && initialIndex >= PageForm.PAGE_SIZE) {
|
||||
fetchOutputBlockTransactions(initialIndex, initialIndex + 1);
|
||||
}
|
||||
|
||||
Platform.runLater(() -> transactionMasterDetail.setDividerPosition(AppServices.isReducedWindowHeight(transactionMasterDetail) ? 0.9 : 0.82));
|
||||
}
|
||||
|
||||
private void initializeTxTree() {
|
||||
|
|
Loading…
Reference in a new issue