From f1083826e3e68803da86af6efba21c4080769b5c Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 7 Apr 2021 09:50:26 +0300 Subject: [PATCH] qt: Make BitcoinGUI aware of runtime palette change This change fixes the GUI when changing appearance on macOS. --- src/qt/bitcoingui.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) {