improve vertical layout sizing on transaction tabs

This commit is contained in:
Craig Raw 2023-11-09 12:17:08 +02:00
parent 870a468584
commit 7b3e5f37b9
2 changed files with 8 additions and 3 deletions

View file

@ -567,11 +567,15 @@ public class AppServices {
public static boolean isReducedWindowHeight() { public static boolean isReducedWindowHeight() {
Window activeWindow = getActiveWindow(); Window activeWindow = getActiveWindow();
return (activeWindow != null && activeWindow.getHeight() < 768); return (activeWindow != null && activeWindow.getHeight() < getReducedWindowHeight());
} }
public static boolean isReducedWindowHeight(Node node) { public static boolean isReducedWindowHeight(Node node) {
return (node.getScene() != null && node.getScene().getWindow().getHeight() < 768); return (node.getScene() != null && node.getScene().getWindow().getHeight() < getReducedWindowHeight());
}
private static double getReducedWindowHeight() {
return org.controlsfx.tools.Platform.getCurrent() == org.controlsfx.tools.Platform.WINDOWS ? 790d : 768d; //Windows includes menu bar of 22px
} }
public Application getApplication() { public Application getApplication() {

View file

@ -224,11 +224,12 @@
</Form> </Form>
<VBox fx:id="finalizeButtonBox" styleClass="signatures-buttons" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="7"> <VBox fx:id="finalizeButtonBox" styleClass="signatures-buttons" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="7">
<Button fx:id="finalizeTransaction" graphicTextGap="5" text="Finalize Transaction for Signing" prefWidth="Infinity" defaultButton="true" onAction="#finalizeTransaction"> <Button fx:id="finalizeTransaction" graphicTextGap="5" text="Finalize Transaction for Signing" prefWidth="Infinity" defaultButton="true" onAction="#finalizeTransaction" minHeight="52">
<graphic> <graphic>
<Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="10" icon="LOCK" /> <Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="10" icon="LOCK" />
</graphic> </graphic>
</Button> </Button>
<Region minHeight="14" />
</VBox> </VBox>
<Form fx:id="signaturesForm" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="6"> <Form fx:id="signaturesForm" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="6">