Browse Source

fix issues with subtabs in new wallets

terminal
Craig Raw 4 years ago
parent
commit
d1ab1db1c5
  1. 10
      src/main/java/com/sparrowwallet/sparrow/AppController.java
  2. 2
      src/main/java/com/sparrowwallet/sparrow/control/WalletImportDialog.java

10
src/main/java/com/sparrowwallet/sparrow/AppController.java

@ -1188,7 +1188,7 @@ public class AppController implements Initializable {
TabPane subTabs = new TabPane();
subTabs.setSide(Side.RIGHT);
subTabs.getStyleClass().addAll("master-only", "wallet-subtabs");
subTabs.getStyleClass().add("master-only");
subTabs.rotateGraphicProperty().set(true);
tab.setContent(subTabs);
@ -1218,7 +1218,13 @@ public class AppController implements Initializable {
if(walletTabData.getWallet() == wallet.getMasterWallet()) {
TabPane subTabs = (TabPane)walletTab.getContent();
addWalletSubTab(subTabs, storage, wallet, backupWallet);
Platform.runLater(() -> subTabs.getStyleClass().remove("master-only"));
Tab masterTab = subTabs.getTabs().get(0);
Label masterLabel = (Label)masterTab.getGraphic();
masterLabel.setText(getAutomaticName(wallet.getMasterWallet()));
Platform.runLater(() -> {
subTabs.getStyleClass().remove("master-only");
subTabs.getStyleClass().add("wallet-subtabs");
});
}
}
}

2
src/main/java/com/sparrowwallet/sparrow/control/WalletImportDialog.java

@ -48,7 +48,7 @@ public class WalletImportDialog extends Dialog<Wallet> {
AnchorPane.setRightAnchor(scrollPane, 0.0);
importAccordion = new Accordion();
List<KeystoreFileImport> keystoreImporters = List.of(new ColdcardSinglesig(), new CoboVaultSinglesig(), new KeystoneSinglesig(), new PassportSinglesig(), new SeedSigner(), new SpecterDIY());
List<KeystoreFileImport> keystoreImporters = List.of(new ColdcardSinglesig(), new CoboVaultSinglesig(), new KeystoneSinglesig(), new PassportSinglesig(), new SpecterDIY());
for(KeystoreFileImport importer : keystoreImporters) {
FileWalletKeystoreImportPane importPane = new FileWalletKeystoreImportPane(importer);
importAccordion.getPanes().add(importPane);

Loading…
Cancel
Save