From a188f70dbe3a2d8d137f1efb7d34c4b413eb5a23 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 21 Jul 2020 08:52:21 +0200 Subject: [PATCH] tweaks and fixes --- .../sparrow/control/MnemonicKeystoreImportPane.java | 3 +++ .../com/sparrowwallet/sparrow/wallet/WalletController.java | 2 +- src/main/resources/com/sparrowwallet/sparrow/general.css | 4 ++++ .../com/sparrowwallet/sparrow/transaction/headers.css | 4 ++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/control/MnemonicKeystoreImportPane.java b/src/main/java/com/sparrowwallet/sparrow/control/MnemonicKeystoreImportPane.java index 5db2527a..6f1d63fe 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/MnemonicKeystoreImportPane.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/MnemonicKeystoreImportPane.java @@ -84,6 +84,7 @@ public class MnemonicKeystoreImportPane extends TitledDescriptionPane { importButton = new SplitMenuButton(); importButton.setAlignment(Pos.CENTER_RIGHT); importButton.setText("Import Keystore"); + importButton.getStyleClass().add("default-button"); importButton.setOnAction(event -> { importButton.setDisable(true); importKeystore(wallet.getScriptType().getDefaultDerivation(), false); @@ -155,11 +156,13 @@ public class MnemonicKeystoreImportPane extends TitledDescriptionPane { }); confirmButton.managedProperty().bind(confirmButton.visibleProperty()); confirmButton.setVisible(false); + confirmButton.setDefaultButton(true); buttonPane.getChildren().add(confirmButton); AnchorPane.setRightAnchor(confirmButton, 0.0); verifyButton = new Button("Verify"); verifyButton.setDisable(true); + verifyButton.setDefaultButton(true); verifyButton.setOnAction(event -> { prepareImport(); }); diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java index c32715f4..bc4d1cba 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java @@ -104,7 +104,7 @@ public class WalletController extends WalletFormController implements Initializa @Subscribe public void walletSettingsChanged(WalletSettingsChangedEvent event) { if(event.getWalletFile().equals(walletForm.getWalletFile())) { - configure(walletForm.getWallet().isValid()); + configure(event.getWallet().isValid()); } } diff --git a/src/main/resources/com/sparrowwallet/sparrow/general.css b/src/main/resources/com/sparrowwallet/sparrow/general.css index 89f533b4..5a959d18 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/general.css +++ b/src/main/resources/com/sparrowwallet/sparrow/general.css @@ -121,4 +121,8 @@ .help-label { -fx-padding: 0 0 0 10; +} + +.default-button { + -fx-base: -fx-default-button; } \ No newline at end of file diff --git a/src/main/resources/com/sparrowwallet/sparrow/transaction/headers.css b/src/main/resources/com/sparrowwallet/sparrow/transaction/headers.css index d7b7abb1..78ece013 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/transaction/headers.css +++ b/src/main/resources/com/sparrowwallet/sparrow/transaction/headers.css @@ -79,11 +79,11 @@ } .segment0 .progress-bar { - -fx-accent: CHART_COLOR_3; + } .segment1 .progress-bar { - -fx-accent: CHART_COLOR_4; + -fx-accent: CHART_COLOR_3; } .segment2 .progress-bar {