Skip to content

Commit 4fae301

Browse files
committed
mempooltxtables.cpp:text outbound red:inbound black
1 parent 369d4cc commit 4fae301

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/qt/mempooltxtables.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ QVariant MempoolTxTableModel::data(const QModelIndex& index, int role) const
5858
default:
5959
return QVariant();
6060
}
61+
} else if (role == Qt::ForegroundRole) {
62+
if (column == Amount) {
63+
if (wtx->credit - wtx->debit > 0) {
64+
return QColor(Qt::black);
65+
} else if (wtx->credit - wtx->debit < 0) {
66+
return QColor(Qt::red);
67+
}
68+
}
6169
} else if (role == OriginalIndexRole) {
6270
// We don't have a simple integer index for WalletTx, so we can return the TXID hash as a string
6371
return QString::fromStdString(wtx->tx->GetHash().ToString());

0 commit comments

Comments
 (0)