diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-06-15 00:20:00 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-06-28 12:09:42 +0300 |
commit | cd46c11577a05f3dc9eac94f27a6985f6ba0509e (patch) | |
tree | be1dbe7e3d06dacdd2afd3cebadb187f5bc9c8b2 /src/qt/overviewpage.cpp | |
parent | 9ea1da6fc91e17bdaa722001b97aadf576f07f65 (diff) |
qt: Draw "eye" sign at the beginning of watch-only addresses
Diffstat (limited to 'src/qt/overviewpage.cpp')
-rw-r--r-- | src/qt/overviewpage.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index b7f1915c9c..57510b4fdf 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -69,18 +69,18 @@ public: foreground = brush.color(); } - painter->setPen(foreground); - QRect boundingRect; - painter->drawText(addressRect, Qt::AlignLeft | Qt::AlignVCenter, address, &boundingRect); - - if (index.data(TransactionTableModel::WatchonlyRole).toBool()) - { + 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); + 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); + QRect boundingRect; + painter->drawText(addressRect, Qt::AlignLeft | Qt::AlignVCenter, address, &boundingRect); + if(amount < 0) { foreground = COLOR_NEGATIVE; |