From 62618e5da5f0a1b8c3be9686f70eb797d263cc67 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Mon, 27 Jul 2020 14:10:22 +0200 Subject: [PATCH] finalize form ui change --- .../transaction/HeadersController.java | 23 +++++++++++++++---- .../sparrow/transaction/headers.css | 14 ++++------- .../sparrow/transaction/headers.fxml | 22 +++++++++++------- 3 files changed, 37 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java b/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java index a6a1d6d3..ea102b14 100644 --- a/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java +++ b/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java @@ -21,6 +21,7 @@ import javafx.fxml.Initializable; import javafx.scene.control.*; import javafx.scene.input.Clipboard; import javafx.scene.input.ClipboardContent; +import javafx.scene.layout.VBox; import javafx.stage.FileChooser; import javafx.stage.Stage; import org.controlsfx.glyphfont.Glyph; @@ -116,7 +117,7 @@ public class HeadersController extends TransactionFormController implements Init private IdLabel blockHash; @FXML - private Form finalizeForm; + private Form signingWalletForm; @FXML private ComboBox signingWallet; @@ -127,9 +128,15 @@ public class HeadersController extends TransactionFormController implements Init @FXML private Hyperlink noWalletsWarningLink; + @FXML + private Form sigHashForm; + @FXML private ComboBox sigHash; + @FXML + private VBox finalizeButtonBox; + @FXML private Button finalizeTransaction; @@ -275,12 +282,18 @@ public class HeadersController extends TransactionFormController implements Init } blockchainForm.managedProperty().bind(blockchainForm.visibleProperty()); - finalizeForm.managedProperty().bind(finalizeForm.visibleProperty()); + + signingWalletForm.managedProperty().bind(signingWalletForm.visibleProperty()); + sigHashForm.managedProperty().bind(sigHashForm.visibleProperty()); + sigHashForm.visibleProperty().bind(signingWalletForm.visibleProperty()); + finalizeButtonBox.managedProperty().bind(finalizeButtonBox.visibleProperty()); + finalizeButtonBox.visibleProperty().bind(signingWalletForm.visibleProperty()); + signaturesForm.managedProperty().bind(signaturesForm.visibleProperty()); broadcastForm.managedProperty().bind(broadcastForm.visibleProperty()); blockchainForm.setVisible(false); - finalizeForm.setVisible(false); + signingWalletForm.setVisible(false); signaturesForm.setVisible(false); broadcastForm.setVisible(false); @@ -291,7 +304,7 @@ public class HeadersController extends TransactionFormController implements Init PSBT psbt = headersForm.getPsbt(); if(headersForm.isEditable()) { - finalizeForm.setVisible(true); + signingWalletForm.setVisible(true); } else if(headersForm.getPsbt().isSigned()) { broadcastForm.setVisible(true); } else { @@ -622,7 +635,7 @@ public class HeadersController extends TransactionFormController implements Init headersForm.setSigningWallet(event.getSigningWallet()); - finalizeForm.setVisible(false); + signingWalletForm.setVisible(false); signaturesForm.setVisible(true); } } diff --git a/src/main/resources/com/sparrowwallet/sparrow/transaction/headers.css b/src/main/resources/com/sparrowwallet/sparrow/transaction/headers.css index 4622e922..922f1f7c 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/transaction/headers.css +++ b/src/main/resources/com/sparrowwallet/sparrow/transaction/headers.css @@ -20,10 +20,6 @@ .locktime { -fx-fill: #986801 } -.signatures-button { - -fx-padding: 10 0 0 0; -} - .unfinalized-psbt { -fx-text-fill: #a0a1a7; } @@ -37,12 +33,16 @@ -fx-text-fill: rgb(202, 18, 67); } +#finalizeButtonBox.signatures-buttons { + -fx-padding: 0 20 10 20; +} + .signatures-buttons { -fx-padding: 10 20 10 20; } .signatures-buttons .segmented-button, .signatures-buttons .button, .signatures-buttons .toggle-button { - -fx-pref-height: 75px; + -fx-pref-height: 65px; -fx-max-width: Infinity; } @@ -50,10 +50,6 @@ -fx-padding: 10 0 10 0; } -.signatures-progress-bar { - -fx-padding: 10 0 10 0; -} - .signatures-progress-bar > .segment { -fx-background-color: transparent; } diff --git a/src/main/resources/com/sparrowwallet/sparrow/transaction/headers.fxml b/src/main/resources/com/sparrowwallet/sparrow/transaction/headers.fxml index f3163319..d9ca9538 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/transaction/headers.fxml +++ b/src/main/resources/com/sparrowwallet/sparrow/transaction/headers.fxml @@ -129,7 +129,7 @@ -
+
@@ -140,6 +140,11 @@ +
+
+ +
+
@@ -155,15 +160,16 @@
- - -
+ + + +