mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-26 00:01:21 +02:00
qt: Make CoinControlDialog aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
This commit is contained in:
@@ -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())
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user