Skip to content

Commit 2b622d4

Browse files
committed
qt: Make CoinControlDialog aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
1 parent 97a6b5e commit 2b622d4

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/qt/coincontroldialog.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,15 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
562562
label->setVisible(nChange < 0);
563563
}
564564

565+
void CoinControlDialog::changeEvent(QEvent* e)
566+
{
567+
#ifdef Q_OS_MACOS
568+
if (e->type() == QEvent::PaletteChange) {
569+
updateView();
570+
}
571+
#endif
572+
}
573+
565574
void CoinControlDialog::updateView()
566575
{
567576
if (!model || !model->getOptionsModel() || !model->getAddressTableModel())

src/qt/coincontroldialog.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ class CoinControlDialog : public QDialog
5151
static QList<CAmount> payAmounts;
5252
static bool fSubtractFeeFromAmount;
5353

54+
protected:
55+
void changeEvent(QEvent* e) override;
56+
5457
private:
5558
Ui::CoinControlDialog *ui;
5659
CCoinControl& m_coin_control;

0 commit comments

Comments
 (0)