File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 3737#include < QUrl>
3838#include < QVBoxLayout>
3939
40- TransactionView::TransactionView (const PlatformStyle *platformStyle, QWidget *parent) :
41- QWidget(parent)
40+ TransactionView::TransactionView (const PlatformStyle *platformStyle, QWidget *parent)
41+ : QWidget(parent), m_platform_style{platformStyle}
4242{
4343 // Build filter row
4444 setContentsMargins (0 ,0 ,0 ,0 );
@@ -264,6 +264,20 @@ void TransactionView::setModel(WalletModel *_model)
264264 }
265265}
266266
267+ void TransactionView::changeEvent (QEvent* e)
268+ {
269+ #ifdef Q_OS_MACOS
270+ if (e->type () == QEvent::PaletteChange) {
271+ watchOnlyWidget->setItemIcon (
272+ TransactionFilterProxy::WatchOnlyFilter_Yes,
273+ m_platform_style->SingleColorIcon (QStringLiteral (" :/icons/eye_plus" )));
274+ watchOnlyWidget->setItemIcon (
275+ TransactionFilterProxy::WatchOnlyFilter_No,
276+ m_platform_style->SingleColorIcon (QStringLiteral (" :/icons/eye_minus" )));
277+ }
278+ #endif
279+ }
280+
267281void TransactionView::chooseDate (int idx)
268282{
269283 if (!transactionProxyModel) return ;
Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ class TransactionView : public QWidget
6060 MINIMUM_COLUMN_WIDTH = 23
6161 };
6262
63+ protected:
64+ void changeEvent (QEvent* e) override ;
65+
6366private:
6467 WalletModel *model{nullptr };
6568 TransactionFilterProxy *transactionProxyModel{nullptr };
@@ -85,6 +88,8 @@ class TransactionView : public QWidget
8588
8689 bool eventFilter (QObject *obj, QEvent *event) override ;
8790
91+ const PlatformStyle* m_platform_style;
92+
8893private Q_SLOTS:
8994 void contextualMenu (const QPoint &);
9095 void dateRangeChanged ();
You can’t perform that action at this time.
0 commit comments