diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-04-08 21:36:11 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-05-01 15:07:11 +0300 |
commit | 2b622d4aced1848393989ee906b1f9d2436f1c1a (patch) | |
tree | dd73db61383bf36aa4d343fd16b3762bffa9628c /src | |
parent | 97a6b5e06a532a4ee029c8ba59c3438369f8b049 (diff) | |
download | bitcoin-2b622d4aced1848393989ee906b1f9d2436f1c1a.tar.xz |
qt: Make CoinControlDialog aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/coincontroldialog.cpp | 9 | ||||
-rw-r--r-- | src/qt/coincontroldialog.h | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index daea2f9cab..8ae0648141 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -562,6 +562,15 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel * label->setVisible(nChange < 0); } +void CoinControlDialog::changeEvent(QEvent* e) +{ +#ifdef Q_OS_MACOS + if (e->type() == QEvent::PaletteChange) { + updateView(); + } +#endif +} + void CoinControlDialog::updateView() { if (!model || !model->getOptionsModel() || !model->getAddressTableModel()) diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h index 6ceb3de61d..3a03341c9e 100644 --- a/src/qt/coincontroldialog.h +++ b/src/qt/coincontroldialog.h @@ -51,6 +51,9 @@ public: static QList<CAmount> payAmounts; static bool fSubtractFeeFromAmount; +protected: + void changeEvent(QEvent* e) override; + private: Ui::CoinControlDialog *ui; CCoinControl& m_coin_control; |