mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-05 09:21:01 +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:
parent
97a6b5e06a
commit
2b622d4ace
@ -562,6 +562,15 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
|
|||||||
label->setVisible(nChange < 0);
|
label->setVisible(nChange < 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CoinControlDialog::changeEvent(QEvent* e)
|
||||||
|
{
|
||||||
|
#ifdef Q_OS_MACOS
|
||||||
|
if (e->type() == QEvent::PaletteChange) {
|
||||||
|
updateView();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void CoinControlDialog::updateView()
|
void CoinControlDialog::updateView()
|
||||||
{
|
{
|
||||||
if (!model || !model->getOptionsModel() || !model->getAddressTableModel())
|
if (!model || !model->getOptionsModel() || !model->getAddressTableModel())
|
||||||
|
@ -51,6 +51,9 @@ public:
|
|||||||
static QList<CAmount> payAmounts;
|
static QList<CAmount> payAmounts;
|
||||||
static bool fSubtractFeeFromAmount;
|
static bool fSubtractFeeFromAmount;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void changeEvent(QEvent* e) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::CoinControlDialog *ui;
|
Ui::CoinControlDialog *ui;
|
||||||
CCoinControl& m_coin_control;
|
CCoinControl& m_coin_control;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user