Skip to content

Commit cd46c11

Browse files
committed
qt: Draw "eye" sign at the beginning of watch-only addresses
1 parent 9ea1da6 commit cd46c11

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/qt/overviewpage.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,18 @@ class TxViewDelegate : public QAbstractItemDelegate
6969
foreground = brush.color();
7070
}
7171

72-
painter->setPen(foreground);
73-
QRect boundingRect;
74-
painter->drawText(addressRect, Qt::AlignLeft | Qt::AlignVCenter, address, &boundingRect);
75-
76-
if (index.data(TransactionTableModel::WatchonlyRole).toBool())
77-
{
72+
if (index.data(TransactionTableModel::WatchonlyRole).toBool()) {
7873
QIcon iconWatchonly = qvariant_cast<QIcon>(index.data(TransactionTableModel::WatchonlyDecorationRole));
79-
QRect watchonlyRect(boundingRect.right() + 5, mainRect.top()+ypad+halfheight, 16, halfheight);
74+
QRect watchonlyRect(addressRect.left(), addressRect.top(), 16, addressRect.height());
8075
iconWatchonly = platformStyle->TextColorIcon(iconWatchonly);
8176
iconWatchonly.paint(painter, watchonlyRect);
77+
addressRect.setLeft(addressRect.left() + watchonlyRect.width() + 5);
8278
}
8379

80+
painter->setPen(foreground);
81+
QRect boundingRect;
82+
painter->drawText(addressRect, Qt::AlignLeft | Qt::AlignVCenter, address, &boundingRect);
83+
8484
if(amount < 0)
8585
{
8686
foreground = COLOR_NEGATIVE;

0 commit comments

Comments
 (0)