aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-06-15 00:20:00 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-07-11 12:03:33 +0300
commite3f1da4bf3db120cc691a844d612fbc522f11fb9 (patch)
tree9194246a7b610b3a47b2bd074e4312be8dd4a46f
parent6ca54ce2ae0808513172c4945e38165e766e1381 (diff)
downloadbitcoin-e3f1da4bf3db120cc691a844d612fbc522f11fb9.tar.xz
qt: Draw "eye" sign at the beginning of watch-only addresses
Github-Pull: bitcoin-core/gui#365 Rebased-From: cd46c11577a05f3dc9eac94f27a6985f6ba0509e
-rw-r--r--src/qt/overviewpage.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 2dea4e1bd6..dfe8b6f5b0 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -68,17 +68,17 @@ 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.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;