mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-08 05:39:38 +02:00
Merge bitcoin-core/gui#275: Support runtime appearance adjustment on macOS
c231254a65qt: Make TransactionView aware of runtime palette change (Hennadii Stepanov)2b622d4aceqt: Make CoinControlDialog aware of runtime palette change (Hennadii Stepanov)97a6b5e06aqt: Make OverviewPage aware of runtime palette change (Hennadii Stepanov)d05f1b278dqt: Make UnitDisplayStatusBarControl aware of runtime palette change (Hennadii Stepanov)6b2ce65392qt: Replace base class of ClickableLabel with ThemedLabel (Hennadii Stepanov)ff530a2093qt: Use GUIUtil::ThemedLabel class (Hennadii Stepanov)d99ef327a8qt: Add GUIUtil::ThemedLabel class (Hennadii Stepanov)c054720e08qt: Make SignVerifyMessageDialog aware of runtime palette change (Hennadii Stepanov)0dcc3fac43qt: Make SendCoinsEntry aware of runtime palette change (Hennadii Stepanov)fa18d28e12qt: Make RPCConsole aware of runtime palette change (Hennadii Stepanov)f1083826e3qt: Make BitcoinGUI aware of runtime palette change (Hennadii Stepanov)ce17861dc4qt: Make PlatformStyle aware of runtime palette change (Hennadii Stepanov) Pull request description: On macOS switching appearance (Light -> Dark or Dark -> Light) when Bitcoin Core is running makes the GUI pretty unusable. This bug is especially important when a user chose the "Auto" mode to adjust appearance automatically. This PR fixes Bitcoin Core behavior. This is an alternative to #268. ACKs for top commit: Sjors: tACKc231254a65on macOS 11.4 goums: ACKc231254a65promag: Tested ACKc231254a65on macOS Big Sur arm64. jarolrod: tACKc231254a65Tree-SHA512: 122dda3e4c9703f68cec60613c536ca59d04c93f2c03398559f2361b8d279ae534800e8e677d94a33e10e769d00be54295a704e98afa2e986a06146b9f164854
This commit is contained in:
@@ -37,8 +37,8 @@
|
||||
#include <QUrl>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *parent) :
|
||||
QWidget(parent)
|
||||
TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *parent)
|
||||
: QWidget(parent), m_platform_style{platformStyle}
|
||||
{
|
||||
// Build filter row
|
||||
setContentsMargins(0,0,0,0);
|
||||
@@ -243,6 +243,20 @@ void TransactionView::setModel(WalletModel *_model)
|
||||
}
|
||||
}
|
||||
|
||||
void TransactionView::changeEvent(QEvent* e)
|
||||
{
|
||||
#ifdef Q_OS_MACOS
|
||||
if (e->type() == QEvent::PaletteChange) {
|
||||
watchOnlyWidget->setItemIcon(
|
||||
TransactionFilterProxy::WatchOnlyFilter_Yes,
|
||||
m_platform_style->SingleColorIcon(QStringLiteral(":/icons/eye_plus")));
|
||||
watchOnlyWidget->setItemIcon(
|
||||
TransactionFilterProxy::WatchOnlyFilter_No,
|
||||
m_platform_style->SingleColorIcon(QStringLiteral(":/icons/eye_minus")));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void TransactionView::chooseDate(int idx)
|
||||
{
|
||||
if (!transactionProxyModel) return;
|
||||
|
||||
Reference in New Issue
Block a user