aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-04-07 20:30:18 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-05-01 15:07:10 +0300
commitff530a2093c294a1093e1b00fb66ab0a98851c04 (patch)
treeeb65dfc855cfa0e60008cbf385dfc10b6b722cc6 /src/qt/bitcoingui.cpp
parentd99ef327a885874fed1c4e35e0f47b10290c6bd9 (diff)
downloadbitcoin-ff530a2093c294a1093e1b00fb66ab0a98851c04.tar.xz
qt: Use GUIUtil::ThemedLabel class
This change fixes the GUI when changing appearance on macOS.
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 48fc09bfdf..5c3f16aab0 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -150,8 +150,8 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
frameBlocksLayout->setContentsMargins(3,0,3,0);
frameBlocksLayout->setSpacing(3);
unitDisplayControl = new UnitDisplayStatusBarControl(platformStyle);
- labelWalletEncryptionIcon = new QLabel();
- labelWalletHDStatusIcon = new QLabel();
+ labelWalletEncryptionIcon = new GUIUtil::ThemedLabel(platformStyle);
+ labelWalletHDStatusIcon = new GUIUtil::ThemedLabel(platformStyle);
labelProxyIcon = new GUIUtil::ClickableLabel();
connectionsControl = new GUIUtil::ClickableLabel();
labelBlocksIcon = new GUIUtil::ClickableLabel();
@@ -1266,7 +1266,7 @@ bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient)
void BitcoinGUI::setHDStatus(bool privkeyDisabled, int hdEnabled)
{
- labelWalletHDStatusIcon->setPixmap(platformStyle->SingleColorIcon(privkeyDisabled ? ":/icons/eye" : hdEnabled ? ":/icons/hd_enabled" : ":/icons/hd_disabled").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
+ labelWalletHDStatusIcon->setThemedPixmap(privkeyDisabled ? QStringLiteral(":/icons/eye") : hdEnabled ? QStringLiteral(":/icons/hd_enabled") : QStringLiteral(":/icons/hd_disabled"), STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
labelWalletHDStatusIcon->setToolTip(privkeyDisabled ? tr("Private key <b>disabled</b>") : hdEnabled ? tr("HD key generation is <b>enabled</b>") : tr("HD key generation is <b>disabled</b>"));
labelWalletHDStatusIcon->show();
// eventually disable the QLabel to set its opacity to 50%
@@ -1285,7 +1285,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
break;
case WalletModel::Unlocked:
labelWalletEncryptionIcon->show();
- labelWalletEncryptionIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
+ labelWalletEncryptionIcon->setThemedPixmap(QStringLiteral(":/icons/lock_open"), STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
labelWalletEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b>"));
encryptWalletAction->setChecked(true);
changePassphraseAction->setEnabled(true);
@@ -1293,7 +1293,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
break;
case WalletModel::Locked:
labelWalletEncryptionIcon->show();
- labelWalletEncryptionIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
+ labelWalletEncryptionIcon->setThemedPixmap(QStringLiteral(":/icons/lock_closed"), STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
labelWalletEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>locked</b>"));
encryptWalletAction->setChecked(true);
changePassphraseAction->setEnabled(true);