@@ -1450,9 +1450,10 @@ bool BitcoinGUI::isPrivacyModeActivated() const
14501450 return m_mask_values_action->isChecked ();
14511451}
14521452
1453- UnitDisplayStatusBarControl::UnitDisplayStatusBarControl (const PlatformStyle *platformStyle) :
1454- optionsModel(nullptr ),
1455- menu(nullptr )
1453+ UnitDisplayStatusBarControl::UnitDisplayStatusBarControl (const PlatformStyle *platformStyle)
1454+ : optionsModel(nullptr ),
1455+ menu(nullptr ),
1456+ m_platform_style{platformStyle}
14561457{
14571458 createContextMenu ();
14581459 setToolTip (tr (" Unit to show amounts in. Click to select another unit." ));
@@ -1465,7 +1466,7 @@ UnitDisplayStatusBarControl::UnitDisplayStatusBarControl(const PlatformStyle *pl
14651466 }
14661467 setMinimumSize (max_width, 0 );
14671468 setAlignment (Qt::AlignRight | Qt::AlignVCenter);
1468- setStyleSheet (QString (" QLabel { color : %1 }" ).arg (platformStyle ->SingleColor ().name ()));
1469+ setStyleSheet (QString (" QLabel { color : %1 }" ).arg (m_platform_style ->SingleColor ().name ()));
14691470}
14701471
14711472/* * So that it responds to button clicks */
@@ -1474,6 +1475,18 @@ void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event)
14741475 onDisplayUnitsClicked (event->pos ());
14751476}
14761477
1478+ void UnitDisplayStatusBarControl::changeEvent (QEvent* e)
1479+ {
1480+ #ifdef Q_OS_MACOS
1481+ if (e->type () == QEvent::PaletteChange) {
1482+ QString style = QString (" QLabel { color : %1 }" ).arg (m_platform_style->SingleColor ().name ());
1483+ if (style != styleSheet ()) {
1484+ setStyleSheet (style);
1485+ }
1486+ }
1487+ #endif
1488+ }
1489+
14771490/* * Creates context menu, its actions, and wires up all the relevant signals for mouse events. */
14781491void UnitDisplayStatusBarControl::createContextMenu ()
14791492{
0 commit comments