mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
qt: Make BitcoinGUI aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
This commit is contained in:
parent
ce17861dc4
commit
f1083826e3
1 changed files with 10 additions and 0 deletions
|
@ -1138,7 +1138,17 @@ void BitcoinGUI::message(const QString& title, QString message, unsigned int sty
|
||||||
|
|
||||||
void BitcoinGUI::changeEvent(QEvent *e)
|
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);
|
QMainWindow::changeEvent(e);
|
||||||
|
|
||||||
#ifndef Q_OS_MAC // Ignored on Mac
|
#ifndef Q_OS_MAC // Ignored on Mac
|
||||||
if(e->type() == QEvent::WindowStateChange)
|
if(e->type() == QEvent::WindowStateChange)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue