qt: Make SendCoinsEntry aware of runtime palette change

This change fixes the GUI when changing appearance on macOS.
This commit is contained in:
Hennadii Stepanov
2021-04-08 12:31:16 +03:00
parent fa18d28e12
commit 0dcc3fac43
2 changed files with 16 additions and 0 deletions

View File

@@ -236,6 +236,19 @@ void SendCoinsEntry::updateDisplayUnit()
}
}
void SendCoinsEntry::changeEvent(QEvent* e)
{
#ifdef Q_OS_MACOS
if (e->type() == QEvent::PaletteChange) {
ui->addressBookButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/address-book")));
ui->pasteButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/editpaste")));
ui->deleteButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
ui->deleteButton_is->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
ui->deleteButton_s->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
}
#endif
}
bool SendCoinsEntry::updateLabel(const QString &address)
{
if(!model)