finalize form ui change

This commit is contained in:
Craig Raw 2020-07-27 14:10:22 +02:00
parent b8edfd9731
commit 62618e5da5
3 changed files with 37 additions and 22 deletions

View file

@ -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<Wallet> signingWallet;
@ -127,9 +128,15 @@ public class HeadersController extends TransactionFormController implements Init
@FXML
private Hyperlink noWalletsWarningLink;
@FXML
private Form sigHashForm;
@FXML
private ComboBox<SigHash> 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);
}
}

View file

@ -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;
}

View file

@ -129,7 +129,7 @@
</Fieldset>
</Form>
<Form fx:id="finalizeForm" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="6">
<Form fx:id="signingWalletForm" GridPane.columnIndex="0" GridPane.rowIndex="6">
<Fieldset text="Signatures" inputGrow="SOMETIMES">
<Field text="Signing Wallet:">
<ComboBox fx:id="signingWallet" />
@ -140,6 +140,11 @@
</Label>
<Hyperlink fx:id="noWalletsWarningLink" text="Open another wallet?" onAction="#openWallet" />
</Field>
</Fieldset>
</Form>
<Form fx:id="sigHashForm" GridPane.columnIndex="1" GridPane.rowIndex="6">
<Fieldset text="" inputGrow="SOMETIMES">
<Field text="Sighash:">
<ComboBox fx:id="sigHash">
<items>
@ -155,14 +160,15 @@
</ComboBox>
</Field>
</Fieldset>
<StackPane styleClass="signatures-button">
</Form>
<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">
<graphic>
<Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="10" icon="LOCK" />
</graphic>
</Button>
</StackPane>
</Form>
</VBox>
<Form fx:id="signaturesForm" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="6">
<Fieldset text="Signatures" inputGrow="SOMETIMES">