aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-04-07 09:50:26 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-05-01 15:07:08 +0300
commitf1083826e3e68803da86af6efba21c4080769b5c (patch)
treeb55eab83462694717f787a76eac5acdc37820574 /src/qt/bitcoingui.cpp
parentce17861dc419b0d1fc1d933000f484dd08bacf5b (diff)
qt: Make BitcoinGUI aware of runtime palette change
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, 10 insertions, 0 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 3e29d8e132..48fc09bfdf 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -1138,7 +1138,17 @@ void BitcoinGUI::message(const QString& title, QString message, unsigned int sty
void BitcoinGUI::changeEvent(QEvent *e)
{
+#ifdef Q_OS_MACOS
+ if (e->type() == QEvent::PaletteChange) {
+ overviewAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/overview")));
+ sendCoinsAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/send")));
+ receiveCoinsAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/receiving_addresses")));
+ historyAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/history")));
+ }
+#endif
+
QMainWindow::changeEvent(e);
+
#ifndef Q_OS_MAC // Ignored on Mac
if(e->type() == QEvent::WindowStateChange)
{