Browse Source

dynamically resize components on window height change

terminal
Craig Raw 4 years ago
parent
commit
30215b0dac
  1. 3
      src/main/java/com/sparrowwallet/sparrow/transaction/TransactionController.java
  2. 3
      src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java
  3. 2
      src/main/resources/com/sparrowwallet/sparrow/about.fxml

3
src/main/java/com/sparrowwallet/sparrow/transaction/TransactionController.java

@ -80,6 +80,9 @@ public class TransactionController implements Initializable {
transactionMasterDetail.sceneProperty().addListener((observable, oldScene, newScene) -> {
if(oldScene == null && newScene != null) {
transactionMasterDetail.setDividerPosition(AppServices.isReducedWindowHeight(transactionMasterDetail) ? 0.9 : 0.82);
newScene.getWindow().heightProperty().addListener((observable1, oldValue, newValue) -> {
transactionMasterDetail.setDividerPosition(AppServices.isReducedWindowHeight(transactionMasterDetail) ? 0.9 : 0.82);
});
}
});
}

3
src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java

@ -341,6 +341,9 @@ public class SendController extends WalletFormController implements Initializabl
transactionDiagram.sceneProperty().addListener((observable, oldScene, newScene) -> {
if(oldScene == null && newScene != null) {
transactionDiagram.update(null);
newScene.getWindow().heightProperty().addListener((observable1, oldValue, newValue) -> {
transactionDiagram.update(walletTransactionProperty.get());
});
}
});
}

2
src/main/resources/com/sparrowwallet/sparrow/about.fxml

@ -8,7 +8,7 @@
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.image.Image?>
<StackPane prefHeight="420.0" prefWidth="600.0" stylesheets="@about.css, @general.css" fx:controller="com.sparrowwallet.sparrow.AboutController" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml">
<StackPane prefHeight="460.0" prefWidth="600.0" stylesheets="@about.css, @general.css" fx:controller="com.sparrowwallet.sparrow.AboutController" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml">
<VBox spacing="20">
<HBox styleClass="title-area">
<HBox alignment="CENTER_LEFT">

Loading…
Cancel
Save