Browse Source

color transaction values which deduct from wallet balance in red

terminal
Craig Raw 4 years ago
parent
commit
31fb527218
  1. 4
      src/main/java/com/sparrowwallet/sparrow/control/CoinCell.java
  2. 1
      src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java
  3. 4
      src/main/resources/com/sparrowwallet/sparrow/darktheme.css
  4. 8
      src/main/resources/com/sparrowwallet/sparrow/wallet/wallet.css

4
src/main/java/com/sparrowwallet/sparrow/control/CoinCell.java

@ -66,6 +66,10 @@ class CoinCell extends TreeTableCell<Entry, Number> {
} else { } else {
setGraphic(null); setGraphic(null);
} }
if(amount.longValue() < 0) {
getStyleClass().add("negative-amount");
}
} else if(entry instanceof UtxoEntry) { } else if(entry instanceof UtxoEntry) {
setGraphic(null); setGraphic(null);
} else if(entry instanceof HashIndexEntry) { } else if(entry instanceof HashIndexEntry) {

1
src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java

@ -416,6 +416,7 @@ public class EntryCell extends TreeTableCell<Entry, Entry> {
cell.getStyleClass().remove("address-cell"); cell.getStyleClass().remove("address-cell");
cell.getStyleClass().remove("hashindex-row"); cell.getStyleClass().remove("hashindex-row");
cell.getStyleClass().remove("confirming"); cell.getStyleClass().remove("confirming");
cell.getStyleClass().remove("negative-amount");
cell.getStyleClass().remove("spent"); cell.getStyleClass().remove("spent");
cell.getStyleClass().remove("unspendable"); cell.getStyleClass().remove("unspendable");

4
src/main/resources/com/sparrowwallet/sparrow/darktheme.css

@ -110,6 +110,10 @@
-fx-text-fill: #e06c75; -fx-text-fill: #e06c75;
} }
.root .coin-cell.negative-amount {
-fx-text-fill: #e09499;
}
.root .etched-raised-border { .root .etched-raised-border {
-fx-border-color: #ffffff, #000000; -fx-border-color: #ffffff, #000000;
-fx-border-style: solid, solid; -fx-border-style: solid, solid;

8
src/main/resources/com/sparrowwallet/sparrow/wallet/wallet.css

@ -75,6 +75,14 @@
-fx-padding: 0 8 0 0; -fx-padding: 0 8 0 0;
} }
.coin-cell.negative-amount {
-fx-text-fill: rgb(202, 18, 67);
}
.tree-table-row-cell:selected .coin-cell.negative-amount {
-fx-text-fill: white;
}
.confirmation-progress-circle, .confirmation-progress-tick { .confirmation-progress-circle, .confirmation-progress-tick {
-fx-stroke: -fx-text-base-color; -fx-stroke: -fx-text-base-color;
} }

Loading…
Cancel
Save