Skip to content

Commit 0dcc3fa

Browse files
committed
qt: Make SendCoinsEntry aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
1 parent fa18d28 commit 0dcc3fa

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/qt/sendcoinsentry.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,19 @@ void SendCoinsEntry::updateDisplayUnit()
236236
}
237237
}
238238

239+
void SendCoinsEntry::changeEvent(QEvent* e)
240+
{
241+
#ifdef Q_OS_MACOS
242+
if (e->type() == QEvent::PaletteChange) {
243+
ui->addressBookButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/address-book")));
244+
ui->pasteButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/editpaste")));
245+
ui->deleteButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
246+
ui->deleteButton_is->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
247+
ui->deleteButton_s->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
248+
}
249+
#endif
250+
}
251+
239252
bool SendCoinsEntry::updateLabel(const QString &address)
240253
{
241254
if(!model)

src/qt/sendcoinsentry.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ private Q_SLOTS:
6969
void on_pasteButton_clicked();
7070
void updateDisplayUnit();
7171

72+
protected:
73+
void changeEvent(QEvent* e) override;
74+
7275
private:
7376
SendCoinsRecipient recipient;
7477
Ui::SendCoinsEntry *ui;

0 commit comments

Comments
 (0)