From 7444a87d8938f9b3b772e032ce3c321e6e644fa7 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Fri, 26 Jun 2020 12:07:19 +0200 Subject: [PATCH] add wallet utxo pane --- .../sparrow/control/AddressCell.java | 41 ++++++++ .../sparrow/control/AmountCell.java | 3 + .../sparrow/control/DateCell.java | 68 +++++++++++++ .../sparrow/control/EntryCell.java | 11 +-- .../control/TransactionsTreeTable.java | 2 +- .../sparrow/control/UtxosTreeTable.java | 95 +++++++++++++++++++ .../sparrow/glyphfont/FontAwesome5.java | 1 + .../sparrow/wallet/Function.java | 2 +- .../wallet/TransactionHashIndexEntry.java | 8 -- .../sparrow/wallet/UtxoEntry.java | 44 +++++++++ .../sparrow/wallet/UtxosController.java | 42 ++++++++ .../sparrow/wallet/WalletForm.java | 10 ++ .../sparrow/wallet/WalletUtxosEntry.java | 57 +++++++++++ .../sparrow/wallet/addresses.css | 6 +- .../sparrow/wallet/addresses.fxml | 4 +- .../sparrowwallet/sparrow/wallet/utxos.css | 5 + .../sparrowwallet/sparrow/wallet/utxos.fxml | 36 +++++++ .../sparrowwallet/sparrow/wallet/wallet.css | 8 +- .../sparrowwallet/sparrow/wallet/wallet.fxml | 6 +- 19 files changed, 420 insertions(+), 29 deletions(-) create mode 100644 src/main/java/com/sparrowwallet/sparrow/control/AddressCell.java create mode 100644 src/main/java/com/sparrowwallet/sparrow/control/DateCell.java create mode 100644 src/main/java/com/sparrowwallet/sparrow/control/UtxosTreeTable.java create mode 100644 src/main/java/com/sparrowwallet/sparrow/wallet/UtxoEntry.java create mode 100644 src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java create mode 100644 src/main/java/com/sparrowwallet/sparrow/wallet/WalletUtxosEntry.java create mode 100644 src/main/resources/com/sparrowwallet/sparrow/wallet/utxos.css create mode 100644 src/main/resources/com/sparrowwallet/sparrow/wallet/utxos.fxml diff --git a/src/main/java/com/sparrowwallet/sparrow/control/AddressCell.java b/src/main/java/com/sparrowwallet/sparrow/control/AddressCell.java new file mode 100644 index 00000000..4e019b2e --- /dev/null +++ b/src/main/java/com/sparrowwallet/sparrow/control/AddressCell.java @@ -0,0 +1,41 @@ +package com.sparrowwallet.sparrow.control; + +import com.sparrowwallet.drongo.address.Address; +import com.sparrowwallet.sparrow.wallet.Entry; +import com.sparrowwallet.sparrow.wallet.UtxoEntry; +import javafx.geometry.Pos; +import javafx.scene.control.ContentDisplay; +import javafx.scene.control.Tooltip; +import javafx.scene.control.TreeTableCell; + +public class AddressCell extends TreeTableCell { + public AddressCell() { + super(); + setAlignment(Pos.CENTER_LEFT); + setContentDisplay(ContentDisplay.RIGHT); + } + + @Override + protected void updateItem(Entry entry, boolean empty) { + super.updateItem(entry, empty); + + EntryCell.applyRowStyles(this, entry); + getStyleClass().add("address-cell"); + + if (empty) { + setText(null); + setGraphic(null); + } else { + if(entry instanceof UtxoEntry) { + UtxoEntry utxoEntry = (UtxoEntry)entry; + Address address = utxoEntry.getAddress(); + setText(address.toString()); + setContextMenu(new EntryCell.AddressContextMenu(address, utxoEntry.getOutputDescriptor())); + Tooltip tooltip = new Tooltip(); + tooltip.setText(utxoEntry.getNode().getDerivationPath()); + setTooltip(tooltip); + } + setGraphic(null); + } + } +} diff --git a/src/main/java/com/sparrowwallet/sparrow/control/AmountCell.java b/src/main/java/com/sparrowwallet/sparrow/control/AmountCell.java index 7c57691b..1844abe1 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/AmountCell.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/AmountCell.java @@ -4,6 +4,7 @@ import com.sparrowwallet.drongo.protocol.Transaction; import com.sparrowwallet.sparrow.wallet.Entry; import com.sparrowwallet.sparrow.wallet.HashIndexEntry; import com.sparrowwallet.sparrow.wallet.TransactionEntry; +import com.sparrowwallet.sparrow.wallet.UtxoEntry; import javafx.scene.control.ContentDisplay; import javafx.scene.control.Tooltip; import javafx.scene.control.TreeTableCell; @@ -51,6 +52,8 @@ class AmountCell extends TreeTableCell { } else { setGraphic(null); } + } else if(entry instanceof UtxoEntry) { + setGraphic(null); } else if(entry instanceof HashIndexEntry) { Region node = new Region(); node.setPrefWidth(10); diff --git a/src/main/java/com/sparrowwallet/sparrow/control/DateCell.java b/src/main/java/com/sparrowwallet/sparrow/control/DateCell.java new file mode 100644 index 00000000..9d301737 --- /dev/null +++ b/src/main/java/com/sparrowwallet/sparrow/control/DateCell.java @@ -0,0 +1,68 @@ +package com.sparrowwallet.sparrow.control; + +import com.sparrowwallet.drongo.wallet.BlockTransactionHashIndex; +import com.sparrowwallet.sparrow.wallet.Entry; +import com.sparrowwallet.sparrow.wallet.UtxoEntry; +import javafx.geometry.Pos; +import javafx.scene.control.*; +import javafx.scene.input.Clipboard; +import javafx.scene.input.ClipboardContent; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; + +public class DateCell extends TreeTableCell { + private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + + public DateCell() { + super(); + setAlignment(Pos.CENTER_LEFT); + setContentDisplay(ContentDisplay.RIGHT); + getStyleClass().add("date-cell"); + } + + @Override + protected void updateItem(Entry entry, boolean empty) { + super.updateItem(entry, empty); + + EntryCell.applyRowStyles(this, entry); + + if (empty) { + setText(null); + setGraphic(null); + } else { + if(entry instanceof UtxoEntry) { + UtxoEntry utxoEntry = (UtxoEntry)entry; + String date = DATE_FORMAT.format(utxoEntry.getHashIndex().getDate()); + setText(date); + setContextMenu(new DateContextMenu(date, utxoEntry.getHashIndex())); + Tooltip tooltip = new Tooltip(); + tooltip.setText(Integer.toString(utxoEntry.getHashIndex().getHeight())); + setTooltip(tooltip); + } + setGraphic(null); + } + } + + private static class DateContextMenu extends ContextMenu { + public DateContextMenu(String date, BlockTransactionHashIndex reference) { + MenuItem copyDate = new MenuItem("Copy Date"); + copyDate.setOnAction(AE -> { + hide(); + ClipboardContent content = new ClipboardContent(); + content.putString(date); + Clipboard.getSystemClipboard().setContent(content); + }); + + MenuItem copyHeight = new MenuItem("Copy Block Height"); + copyHeight.setOnAction(AE -> { + hide(); + ClipboardContent content = new ClipboardContent(); + content.putString(Integer.toString(reference.getHeight())); + Clipboard.getSystemClipboard().setContent(content); + }); + + getItems().addAll(copyDate, copyHeight); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java b/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java index 89b41d20..e684ae08 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java @@ -8,10 +8,7 @@ import com.sparrowwallet.sparrow.event.ReceiveActionEvent; import com.sparrowwallet.sparrow.event.ReceiveToEvent; import com.sparrowwallet.sparrow.event.ViewTransactionEvent; import com.sparrowwallet.sparrow.glyphfont.FontAwesome5; -import com.sparrowwallet.sparrow.wallet.Entry; -import com.sparrowwallet.sparrow.wallet.HashIndexEntry; -import com.sparrowwallet.sparrow.wallet.NodeEntry; -import com.sparrowwallet.sparrow.wallet.TransactionEntry; +import com.sparrowwallet.sparrow.wallet.*; import javafx.application.Platform; import javafx.geometry.Pos; import javafx.scene.control.*; @@ -118,7 +115,7 @@ class EntryCell extends TreeTableCell { }); MenuItem copyHeight = new MenuItem("Copy Block Height"); - copyTxid.setOnAction(AE -> { + copyHeight.setOnAction(AE -> { hide(); ClipboardContent content = new ClipboardContent(); content.putString(Integer.toString(blockTransaction.getHeight())); @@ -129,7 +126,7 @@ class EntryCell extends TreeTableCell { } } - private static class AddressContextMenu extends ContextMenu { + public static class AddressContextMenu extends ContextMenu { public AddressContextMenu(Address address, String outputDescriptor) { MenuItem copyAddress = new MenuItem("Copy Address"); copyAddress.setOnAction(AE -> { @@ -195,6 +192,8 @@ class EntryCell extends TreeTableCell { } } else if(entry instanceof NodeEntry) { cell.getStyleClass().add("node-row"); + } else if(entry instanceof UtxoEntry) { + cell.getStyleClass().add("utxo-row"); } else if(entry instanceof HashIndexEntry) { cell.getStyleClass().add("hashindex-row"); HashIndexEntry hashIndexEntry = (HashIndexEntry)entry; diff --git a/src/main/java/com/sparrowwallet/sparrow/control/TransactionsTreeTable.java b/src/main/java/com/sparrowwallet/sparrow/control/TransactionsTreeTable.java index 7763e077..890c28b0 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/TransactionsTreeTable.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/TransactionsTreeTable.java @@ -70,7 +70,7 @@ public class TransactionsTreeTable extends TreeTableView { } public void updateHistory(List updatedNodes) { - //Recalculate from scratch and update according - any changes may affect the balance of other transactions + //Recalculate from scratch and update accordingly - any changes may affect the balance of other transactions WalletTransactionsEntry rootEntry = (WalletTransactionsEntry)getRoot().getValue(); rootEntry.updateTransactions(); sort(); diff --git a/src/main/java/com/sparrowwallet/sparrow/control/UtxosTreeTable.java b/src/main/java/com/sparrowwallet/sparrow/control/UtxosTreeTable.java new file mode 100644 index 00000000..0bb18a6b --- /dev/null +++ b/src/main/java/com/sparrowwallet/sparrow/control/UtxosTreeTable.java @@ -0,0 +1,95 @@ +package com.sparrowwallet.sparrow.control; + +import com.sparrowwallet.drongo.wallet.WalletNode; +import com.sparrowwallet.sparrow.wallet.*; +import javafx.beans.property.ReadOnlyObjectWrapper; +import javafx.scene.control.Label; +import javafx.scene.control.TreeTableColumn; +import javafx.scene.control.TreeTableView; + +import java.util.List; + +public class UtxosTreeTable extends TreeTableView { + public void initialize(WalletUtxosEntry rootEntry) { + getStyleClass().add("utxos-treetable"); + + updateAll(rootEntry); + setShowRoot(false); + + TreeTableColumn dateCol = new TreeTableColumn<>("Date"); + dateCol.setCellValueFactory((TreeTableColumn.CellDataFeatures param) -> { + return new ReadOnlyObjectWrapper<>(param.getValue().getValue()); + }); + dateCol.setCellFactory(p -> new DateCell()); + dateCol.setSortable(true); + getColumns().add(dateCol); + + TreeTableColumn outputCol = new TreeTableColumn<>("Output"); + outputCol.setCellValueFactory((TreeTableColumn.CellDataFeatures param) -> { + return new ReadOnlyObjectWrapper<>(param.getValue().getValue()); + }); + outputCol.setCellFactory(p -> new EntryCell()); + outputCol.setSortable(true); + outputCol.setComparator((o1, o2) -> { + UtxoEntry entry1 = (UtxoEntry)o1; + UtxoEntry entry2 = (UtxoEntry)o2; + return entry1.getDescription().compareTo(entry2.getDescription()); + }); + getColumns().add(outputCol); + + TreeTableColumn addressCol = new TreeTableColumn<>("Address"); + addressCol.setCellValueFactory((TreeTableColumn.CellDataFeatures param) -> { + return new ReadOnlyObjectWrapper<>(param.getValue().getValue()); + }); + addressCol.setCellFactory(p -> new AddressCell()); + addressCol.setSortable(true); + addressCol.setComparator((o1, o2) -> { + UtxoEntry entry1 = (UtxoEntry)o1; + UtxoEntry entry2 = (UtxoEntry)o2; + return entry1.getAddress().toString().compareTo(entry2.getAddress().toString()); + }); + getColumns().add(addressCol); + + TreeTableColumn labelCol = new TreeTableColumn<>("Label"); + labelCol.setCellValueFactory((TreeTableColumn.CellDataFeatures param) -> { + return param.getValue().getValue().labelProperty(); + }); + labelCol.setCellFactory(p -> new LabelCell()); + labelCol.setSortable(true); + getColumns().add(labelCol); + + TreeTableColumn amountCol = new TreeTableColumn<>("Value"); + amountCol.setCellValueFactory((TreeTableColumn.CellDataFeatures param) -> { + return new ReadOnlyObjectWrapper<>(param.getValue().getValue().getValue()); + }); + amountCol.setCellFactory(p -> new AmountCell()); + amountCol.setSortable(true); + getColumns().add(amountCol); + setTreeColumn(amountCol); + + setPlaceholder(new Label("No unspent outputs")); + setEditable(true); + setColumnResizePolicy(TreeTableView.CONSTRAINED_RESIZE_POLICY); + dateCol.setSortType(TreeTableColumn.SortType.DESCENDING); + getSortOrder().add(dateCol); + } + + public void updateAll(WalletUtxosEntry rootEntry) { + RecursiveTreeItem rootItem = new RecursiveTreeItem<>(rootEntry, Entry::getChildren); + setRoot(rootItem); + rootItem.setExpanded(true); + + if(getColumns().size() > 0 && getSortOrder().isEmpty()) { + TreeTableColumn dateCol = getColumns().get(0); + getSortOrder().add(dateCol); + dateCol.setSortType(TreeTableColumn.SortType.DESCENDING); + } + } + + public void updateHistory(List updatedNodes) { + //Recalculate from scratch and update accordingly + WalletUtxosEntry rootEntry = (WalletUtxosEntry)getRoot().getValue(); + rootEntry.updateUtxos(); + sort(); + } +} diff --git a/src/main/java/com/sparrowwallet/sparrow/glyphfont/FontAwesome5.java b/src/main/java/com/sparrowwallet/sparrow/glyphfont/FontAwesome5.java index 5e980c2a..8080aaa3 100644 --- a/src/main/java/com/sparrowwallet/sparrow/glyphfont/FontAwesome5.java +++ b/src/main/java/com/sparrowwallet/sparrow/glyphfont/FontAwesome5.java @@ -17,6 +17,7 @@ public class FontAwesome5 extends GlyphFont { public static enum Glyph implements INamedCharacter { CHECK_CIRCLE('\uf058'), CIRCLE('\uf111'), + COINS('\uf51e'), EXCLAMATION_CIRCLE('\uf06a'), ELLIPSIS_H('\uf141'), EYE('\uf06e'), diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/Function.java b/src/main/java/com/sparrowwallet/sparrow/wallet/Function.java index f1999b82..86b6d90f 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/Function.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/Function.java @@ -1,5 +1,5 @@ package com.sparrowwallet.sparrow.wallet; public enum Function { - TRANSACTIONS, SEND, RECEIVE, ADDRESSES, POLICIES, SETTINGS; + TRANSACTIONS, SEND, RECEIVE, ADDRESSES, UTXOS, SETTINGS; } diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/TransactionHashIndexEntry.java b/src/main/java/com/sparrowwallet/sparrow/wallet/TransactionHashIndexEntry.java index d91bc33f..3ef6bc67 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/TransactionHashIndexEntry.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/TransactionHashIndexEntry.java @@ -29,14 +29,6 @@ public class TransactionHashIndexEntry extends HashIndexEntry { } } - public BlockTransaction getSpentByTransaction() { - if(getHashIndex().getSpentBy() != null) { - return getWallet().getTransactions().get(getHashIndex().getSpentBy().getHash()); - } - - return null; - } - @Override public boolean isSpent() { return false; diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/UtxoEntry.java b/src/main/java/com/sparrowwallet/sparrow/wallet/UtxoEntry.java new file mode 100644 index 00000000..f239ea41 --- /dev/null +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/UtxoEntry.java @@ -0,0 +1,44 @@ +package com.sparrowwallet.sparrow.wallet; + +import com.sparrowwallet.drongo.address.Address; +import com.sparrowwallet.drongo.wallet.BlockTransactionHashIndex; +import com.sparrowwallet.drongo.wallet.Wallet; +import com.sparrowwallet.drongo.wallet.WalletNode; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; + +public class UtxoEntry extends HashIndexEntry { + private final WalletNode node; + + public UtxoEntry(Wallet wallet, BlockTransactionHashIndex hashIndex, Type type, WalletNode node) { + super(wallet, hashIndex, type, node.getKeyPurpose()); + this.node = node; + } + + @Override + public ObservableList getChildren() { + return FXCollections.emptyObservableList(); + } + + @Override + public String getDescription() { + return getHashIndex().getHash().toString().substring(0, 8) + "...:" + getHashIndex().getIndex(); + } + + @Override + public boolean isSpent() { + return false; + } + + public Address getAddress() { + return getWallet().getAddress(node); + } + + public WalletNode getNode() { + return node; + } + + public String getOutputDescriptor() { + return getWallet().getOutputDescriptor(node); + } +} diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java new file mode 100644 index 00000000..9e9d27f2 --- /dev/null +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java @@ -0,0 +1,42 @@ +package com.sparrowwallet.sparrow.wallet; + +import com.google.common.eventbus.Subscribe; +import com.sparrowwallet.sparrow.EventManager; +import com.sparrowwallet.sparrow.control.UtxosTreeTable; +import com.sparrowwallet.sparrow.event.WalletHistoryChangedEvent; +import com.sparrowwallet.sparrow.event.WalletNodesChangedEvent; +import javafx.fxml.FXML; +import javafx.fxml.Initializable; + +import java.net.URL; +import java.util.ResourceBundle; + +public class UtxosController extends WalletFormController implements Initializable { + + @FXML + private UtxosTreeTable utxosTable; + + @Override + public void initialize(URL location, ResourceBundle resources) { + EventManager.get().register(this); + } + + @Override + public void initializeView() { + utxosTable.initialize(getWalletForm().getWalletUtxosEntry()); + } + + @Subscribe + public void walletNodesChanged(WalletNodesChangedEvent event) { + if(event.getWallet().equals(walletForm.getWallet())) { + utxosTable.updateAll(getWalletForm().getWalletUtxosEntry()); + } + } + + @Subscribe + public void walletHistoryChanged(WalletHistoryChangedEvent event) { + if(event.getWallet().equals(walletForm.getWallet())) { + utxosTable.updateHistory(event.getHistoryChangedNodes()); + } + } +} diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletForm.java b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletForm.java index d8f26764..34747da6 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletForm.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletForm.java @@ -20,6 +20,7 @@ public class WalletForm { protected Wallet wallet; private WalletTransactionsEntry walletTransactionsEntry; + private WalletUtxosEntry walletUtxosEntry; private final List accountEntries = new ArrayList<>(); public WalletForm(Storage storage, Wallet currentWallet) { @@ -136,6 +137,14 @@ public class WalletForm { return walletTransactionsEntry; } + public WalletUtxosEntry getWalletUtxosEntry() { + if(walletUtxosEntry == null) { + walletUtxosEntry = new WalletUtxosEntry(wallet); + } + + return walletUtxosEntry; + } + @Subscribe public void walletLabelChanged(WalletEntryLabelChangedEvent event) { if(event.getWallet().equals(wallet)) { @@ -164,6 +173,7 @@ public class WalletForm { if(event.getWalletFile().equals(storage.getWalletFile())) { wallet = event.getWallet(); walletTransactionsEntry = null; + walletUtxosEntry = null; accountEntries.clear(); EventManager.get().post(new WalletNodesChangedEvent(wallet)); refreshHistory(AppController.getCurrentBlockHeight()); diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletUtxosEntry.java b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletUtxosEntry.java new file mode 100644 index 00000000..5ebeabbd --- /dev/null +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletUtxosEntry.java @@ -0,0 +1,57 @@ +package com.sparrowwallet.sparrow.wallet; + +import com.sparrowwallet.drongo.KeyPurpose; +import com.sparrowwallet.drongo.wallet.BlockTransactionHashIndex; +import com.sparrowwallet.drongo.wallet.Wallet; +import com.sparrowwallet.drongo.wallet.WalletNode; + +import java.util.*; +import java.util.stream.Collectors; + +public class WalletUtxosEntry extends Entry { + private final Wallet wallet; + + public WalletUtxosEntry(Wallet wallet) { + super(wallet.getName(), getWalletUtxos(wallet).entrySet().stream().map(entry -> new UtxoEntry(wallet, entry.getKey(), HashIndexEntry.Type.OUTPUT, entry.getValue())).collect(Collectors.toList())); + this.wallet = wallet; + } + + public Wallet getWallet() { + return wallet; + } + + @Override + public Long getValue() { + return 0L; + } + + public void updateUtxos() { + List current = getWalletUtxos(wallet).entrySet().stream().map(entry -> new UtxoEntry(wallet, entry.getKey(), HashIndexEntry.Type.OUTPUT, entry.getValue())).collect(Collectors.toList()); + List previous = new ArrayList<>(getChildren()); + + List entriesAdded = new ArrayList<>(current); + entriesAdded.removeAll(previous); + getChildren().addAll(entriesAdded); + + List entriesRemoved = new ArrayList<>(previous); + entriesRemoved.removeAll(current); + getChildren().removeAll(entriesRemoved); + } + + private static Map getWalletUtxos(Wallet wallet) { + Map walletUtxos = new TreeMap<>(); + + getWalletUtxos(wallet, walletUtxos, wallet.getNode(KeyPurpose.RECEIVE)); + getWalletUtxos(wallet, walletUtxos, wallet.getNode(KeyPurpose.CHANGE)); + + return walletUtxos; + } + + private static void getWalletUtxos(Wallet wallet, Map walletUtxos, WalletNode purposeNode) { + for(WalletNode addressNode : purposeNode.getChildren()) { + for(BlockTransactionHashIndex utxo : addressNode.getUnspentTransactionOutputs()) { + walletUtxos.put(utxo, addressNode); + } + } + } +} diff --git a/src/main/resources/com/sparrowwallet/sparrow/wallet/addresses.css b/src/main/resources/com/sparrowwallet/sparrow/wallet/addresses.css index 8b137891..1302e18d 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/wallet/addresses.css +++ b/src/main/resources/com/sparrowwallet/sparrow/wallet/addresses.css @@ -1 +1,5 @@ - +.addresses-treetable-label { + -fx-font-weight: bold; + -fx-font-size: 1.2em; + -fx-padding: 10 0 10 0; +} diff --git a/src/main/resources/com/sparrowwallet/sparrow/wallet/addresses.fxml b/src/main/resources/com/sparrowwallet/sparrow/wallet/addresses.fxml index ce022b12..5bc9c96a 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/wallet/addresses.fxml +++ b/src/main/resources/com/sparrowwallet/sparrow/wallet/addresses.fxml @@ -21,7 +21,7 @@ -
@@ -29,7 +29,7 @@ -
diff --git a/src/main/resources/com/sparrowwallet/sparrow/wallet/utxos.css b/src/main/resources/com/sparrowwallet/sparrow/wallet/utxos.css new file mode 100644 index 00000000..2e809bff --- /dev/null +++ b/src/main/resources/com/sparrowwallet/sparrow/wallet/utxos.css @@ -0,0 +1,5 @@ +.utxos-treetable-label { + -fx-font-weight: bold; + -fx-font-size: 1.2em; + -fx-padding: 10 0 10 0; +} \ No newline at end of file diff --git a/src/main/resources/com/sparrowwallet/sparrow/wallet/utxos.fxml b/src/main/resources/com/sparrowwallet/sparrow/wallet/utxos.fxml new file mode 100644 index 00000000..47a3a523 --- /dev/null +++ b/src/main/resources/com/sparrowwallet/sparrow/wallet/utxos.fxml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +
+
+
diff --git a/src/main/resources/com/sparrowwallet/sparrow/wallet/wallet.css b/src/main/resources/com/sparrowwallet/sparrow/wallet/wallet.css index 70ca9fbe..5c66eec1 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/wallet/wallet.css +++ b/src/main/resources/com/sparrowwallet/sparrow/wallet/wallet.css @@ -29,13 +29,7 @@ -fx-background-color: -fx-background; } -.address-treetable-label { - -fx-font-weight: bold; - -fx-font-size: 1.2em; - -fx-padding: 10 0 10 0; -} - -.address-cell { +.address-cell, .utxo-row.entry-cell { -fx-font-family: Courier; } diff --git a/src/main/resources/com/sparrowwallet/sparrow/wallet/wallet.fxml b/src/main/resources/com/sparrowwallet/sparrow/wallet/wallet.fxml index 8b3fa64f..86c426b7 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/wallet/wallet.fxml +++ b/src/main/resources/com/sparrowwallet/sparrow/wallet/wallet.fxml @@ -46,12 +46,12 @@ - + - + - +