mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
qt: Draw "eye" sign at the beginning of watch-only addresses
This commit is contained in:
parent
9ea1da6fc9
commit
cd46c11577
1 changed files with 8 additions and 8 deletions
|
@ -69,18 +69,18 @@ public:
|
||||||
foreground = brush.color();
|
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 = platformStyle->TextColorIcon(iconWatchonly);
|
||||||
|
iconWatchonly.paint(painter, watchonlyRect);
|
||||||
|
addressRect.setLeft(addressRect.left() + watchonlyRect.width() + 5);
|
||||||
|
}
|
||||||
|
|
||||||
painter->setPen(foreground);
|
painter->setPen(foreground);
|
||||||
QRect boundingRect;
|
QRect boundingRect;
|
||||||
painter->drawText(addressRect, Qt::AlignLeft | Qt::AlignVCenter, address, &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 = platformStyle->TextColorIcon(iconWatchonly);
|
|
||||||
iconWatchonly.paint(painter, watchonlyRect);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(amount < 0)
|
if(amount < 0)
|
||||||
{
|
{
|
||||||
foreground = COLOR_NEGATIVE;
|
foreground = COLOR_NEGATIVE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue