diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-04-07 09:50:26 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-05-01 15:07:08 +0300 |
commit | f1083826e3e68803da86af6efba21c4080769b5c (patch) | |
tree | b55eab83462694717f787a76eac5acdc37820574 /src/qt/bitcoingui.cpp | |
parent | ce17861dc419b0d1fc1d933000f484dd08bacf5b (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.cpp | 10 |
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) { |