qt: Draw "eye" sign at the beginning of watch-only addresses

Github-Pull: bitcoin-core/gui#365
Rebased-From: cd46c11577a05f3dc9eac94f27a6985f6ba0509e
This commit is contained in:
Hennadii Stepanov 2021-06-15 00:20:00 +03:00
parent 6ca54ce2ae
commit e3f1da4bf3
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -68,17 +68,17 @@ public:
foreground = brush.color();
}
if (index.data(TransactionTableModel::WatchonlyRole).toBool()) {
QIcon iconWatchonly = qvariant_cast<QIcon>(index.data(TransactionTableModel::WatchonlyDecorationRole));
QRect watchonlyRect(addressRect.left(), addressRect.top(), 16, addressRect.height());
iconWatchonly.paint(painter, watchonlyRect);
addressRect.setLeft(addressRect.left() + watchonlyRect.width() + 5);
}
painter->setPen(foreground);
QRect boundingRect;
painter->drawText(addressRect, Qt::AlignLeft | Qt::AlignVCenter, address, &boundingRect);
if (index.data(TransactionTableModel::WatchonlyRole).toBool())
{
QIcon iconWatchonly = qvariant_cast<QIcon>(index.data(TransactionTableModel::WatchonlyDecorationRole));
QRect watchonlyRect(boundingRect.right() + 5, mainRect.top()+ypad+halfheight, 16, halfheight);
iconWatchonly.paint(painter, watchonlyRect);
}
if(amount < 0)
{
foreground = COLOR_NEGATIVE;