Skip to content

Commit

Permalink
qt: Make BitcoinGUI aware of runtime palette change
Browse files Browse the repository at this point in the history
This change fixes the GUI when changing appearance on macOS.
  • Loading branch information
hebasto committed May 1, 2021
1 parent ce17861 commit f108382
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit f108382

Please sign in to comment.