diff --git a/drongo b/drongo index 056d5f83..0ce32e43 160000 --- a/drongo +++ b/drongo @@ -1 +1 @@ -Subproject commit 056d5f83a6296ad8f673066ea9dbc68972a183e9 +Subproject commit 0ce32e431460dca67dfca8c34c609ac54579b6a6 diff --git a/lark b/lark index 0b1d5f06..91140aa6 160000 --- a/lark +++ b/lark @@ -1 +1 @@ -Subproject commit 0b1d5f06a830aa40407fd7d50ebace0767db6ec6 +Subproject commit 91140aa6f73ef20577cacb78fc51d0e125e30807 diff --git a/src/main/java/com/sparrowwallet/sparrow/control/DevicePane.java b/src/main/java/com/sparrowwallet/sparrow/control/DevicePane.java index a74d8ce6..a1ee7421 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/DevicePane.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/DevicePane.java @@ -453,20 +453,26 @@ public class DevicePane extends TitledDescriptionPane { }); vBox.getChildren().addAll(pinField, enterPinButton); - TilePane tilePane = new TilePane(); - tilePane.setPrefColumns(3); - tilePane.setHgap(10); - tilePane.setVgap(10); - tilePane.setMaxWidth(150); - tilePane.setMaxHeight(120); + GridPane gridPane = new GridPane(); + gridPane.setHgap(10); + gridPane.setVgap(10); + gridPane.setMaxWidth(150); + gridPane.setMaxHeight(device.getModel().hasZeroInPin() ? 160 : 120); - int[] digits = new int[] {7, 8, 9, 4, 5, 6, 1, 2, 3}; + int[] digits = device.getModel().hasZeroInPin() ? new int[] {7, 8, 9, 4, 5, 6, 1, 2, 3, 0} : new int[] {7, 8, 9, 4, 5, 6, 1, 2, 3}; for(int i = 0; i < digits.length; i++) { Button pinButton = new Button(); Glyph circle = new Glyph(FontAwesome5.FONT_NAME, "CIRCLE"); pinButton.setGraphic(circle); pinButton.setUserData(digits[i]); - tilePane.getChildren().add(pinButton); + GridPane.setRowIndex(pinButton, i / 3); + GridPane.setColumnIndex(pinButton, i % 3); + if((i / 3) == 3) { + GridPane.setHgrow(pinButton, Priority.ALWAYS); + GridPane.setColumnSpan(pinButton, 3); + pinButton.setMaxWidth(Double.MAX_VALUE); + } + gridPane.getChildren().add(pinButton); pinButton.setOnAction(event -> { pinField.setText(pinField.getText() + pinButton.getUserData()); }); @@ -474,7 +480,7 @@ public class DevicePane extends TitledDescriptionPane { HBox contentBox = new HBox(); contentBox.setSpacing(50); - contentBox.getChildren().add(tilePane); + contentBox.getChildren().add(gridPane); contentBox.getChildren().add(vBox); contentBox.setPadding(new Insets(10, 0, 10, 0)); contentBox.setAlignment(Pos.TOP_CENTER);