color transaction values which deduct from wallet balance in red

This commit is contained in:
Craig Raw 2021-04-12 09:16:49 +02:00
parent 685fef6b76
commit 31fb527218
4 changed files with 17 additions and 0 deletions

View file

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

View file

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

View file

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

View file

@ -75,6 +75,14 @@
-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 {
-fx-stroke: -fx-text-base-color;
}