@@ -1450,9 +1450,10 @@ bool BitcoinGUI::isPrivacyModeActivated() const
1450
1450
return m_mask_values_action->isChecked ();
1451
1451
}
1452
1452
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}
1456
1457
{
1457
1458
createContextMenu ();
1458
1459
setToolTip (tr (" Unit to show amounts in. Click to select another unit." ));
@@ -1465,7 +1466,7 @@ UnitDisplayStatusBarControl::UnitDisplayStatusBarControl(const PlatformStyle *pl
1465
1466
}
1466
1467
setMinimumSize (max_width, 0 );
1467
1468
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 ()));
1469
1470
}
1470
1471
1471
1472
/* * So that it responds to button clicks */
@@ -1474,6 +1475,18 @@ void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event)
1474
1475
onDisplayUnitsClicked (event->pos ());
1475
1476
}
1476
1477
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
+
1477
1490
/* * Creates context menu, its actions, and wires up all the relevant signals for mouse events. */
1478
1491
void UnitDisplayStatusBarControl::createContextMenu ()
1479
1492
{
0 commit comments