Skip to content

Commit f108382

Browse files
committed
qt: Make BitcoinGUI aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
1 parent ce17861 commit f108382

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/qt/bitcoingui.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,17 @@ void BitcoinGUI::message(const QString& title, QString message, unsigned int sty
11381138

11391139
void BitcoinGUI::changeEvent(QEvent *e)
11401140
{
1141+
#ifdef Q_OS_MACOS
1142+
if (e->type() == QEvent::PaletteChange) {
1143+
overviewAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/overview")));
1144+
sendCoinsAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/send")));
1145+
receiveCoinsAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/receiving_addresses")));
1146+
historyAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/history")));
1147+
}
1148+
#endif
1149+
11411150
QMainWindow::changeEvent(e);
1151+
11421152
#ifndef Q_OS_MAC // Ignored on Mac
11431153
if(e->type() == QEvent::WindowStateChange)
11441154
{

0 commit comments

Comments
 (0)