mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
qt: Make SendCoinsEntry aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
This commit is contained in:
@@ -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)
|
bool SendCoinsEntry::updateLabel(const QString &address)
|
||||||
{
|
{
|
||||||
if(!model)
|
if(!model)
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ private Q_SLOTS:
|
|||||||
void on_pasteButton_clicked();
|
void on_pasteButton_clicked();
|
||||||
void updateDisplayUnit();
|
void updateDisplayUnit();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void changeEvent(QEvent* e) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SendCoinsRecipient recipient;
|
SendCoinsRecipient recipient;
|
||||||
Ui::SendCoinsEntry *ui;
|
Ui::SendCoinsEntry *ui;
|
||||||
|
|||||||
Reference in New Issue
Block a user