Skip to content

Commit c901d4d

Browse files
committed
GUI: Enable palette change adaptation on all platforms
1 parent 327e269 commit c901d4d

File tree

8 files changed

+0
-18
lines changed

8 files changed

+0
-18
lines changed

src/qt/bitcoingui.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,14 +1173,12 @@ void BitcoinGUI::message(const QString& title, QString message, unsigned int sty
11731173

11741174
void BitcoinGUI::changeEvent(QEvent *e)
11751175
{
1176-
#ifdef Q_OS_MACOS
11771176
if (e->type() == QEvent::PaletteChange) {
11781177
overviewAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/overview")));
11791178
sendCoinsAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/send")));
11801179
receiveCoinsAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/receiving_addresses")));
11811180
historyAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/history")));
11821181
}
1183-
#endif
11841182

11851183
QMainWindow::changeEvent(e);
11861184

@@ -1511,14 +1509,12 @@ void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event)
15111509

15121510
void UnitDisplayStatusBarControl::changeEvent(QEvent* e)
15131511
{
1514-
#ifdef Q_OS_MACOS
15151512
if (e->type() == QEvent::PaletteChange) {
15161513
QString style = QString("QLabel { color : %1 }").arg(m_platform_style->SingleColor().name());
15171514
if (style != styleSheet()) {
15181515
setStyleSheet(style);
15191516
}
15201517
}
1521-
#endif
15221518
}
15231519

15241520
/** Creates context menu, its actions, and wires up all the relevant signals for mouse events. */

src/qt/coincontroldialog.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,11 +564,9 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
564564

565565
void CoinControlDialog::changeEvent(QEvent* e)
566566
{
567-
#ifdef Q_OS_MACOS
568567
if (e->type() == QEvent::PaletteChange) {
569568
updateView();
570569
}
571-
#endif
572570
}
573571

574572
void CoinControlDialog::updateView()

src/qt/guiutil.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,11 +809,9 @@ void ThemedLabel::setThemedPixmap(const QString& image_filename, int width, int
809809

810810
void ThemedLabel::changeEvent(QEvent* e)
811811
{
812-
#ifdef Q_OS_MACOS
813812
if (e->type() == QEvent::PaletteChange) {
814813
updateThemedPixmap();
815814
}
816-
#endif
817815
QLabel::changeEvent(e);
818816
}
819817

src/qt/overviewpage.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,13 +297,11 @@ void OverviewPage::setWalletModel(WalletModel *model)
297297

298298
void OverviewPage::changeEvent(QEvent* e)
299299
{
300-
#ifdef Q_OS_MACOS
301300
if (e->type() == QEvent::PaletteChange) {
302301
QIcon icon = m_platform_style->SingleColorIcon(QStringLiteral(":/icons/warning"));
303302
ui->labelTransactionsStatus->setIcon(icon);
304303
ui->labelWalletStatus->setIcon(icon);
305304
}
306-
#endif
307305
}
308306

309307
void OverviewPage::updateDisplayUnit()

src/qt/rpcconsole.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,6 @@ void RPCConsole::keyPressEvent(QKeyEvent *event)
882882

883883
void RPCConsole::changeEvent(QEvent* e)
884884
{
885-
#ifdef Q_OS_MACOS
886885
if (e->type() == QEvent::PaletteChange) {
887886
ui->clearButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
888887
ui->fontBiggerButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/fontbigger")));
@@ -896,7 +895,6 @@ void RPCConsole::changeEvent(QEvent* e)
896895
platformStyle->SingleColorImage(ICON_MAPPING[i].source).scaled(QSize(consoleFontSize * 2, consoleFontSize * 2), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
897896
}
898897
}
899-
#endif
900898
}
901899

902900
void RPCConsole::message(int category, const QString &message, bool html)

src/qt/sendcoinsentry.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,13 @@ void SendCoinsEntry::updateDisplayUnit()
238238

239239
void SendCoinsEntry::changeEvent(QEvent* e)
240240
{
241-
#ifdef Q_OS_MACOS
242241
if (e->type() == QEvent::PaletteChange) {
243242
ui->addressBookButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/address-book")));
244243
ui->pasteButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/editpaste")));
245244
ui->deleteButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
246245
ui->deleteButton_is->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
247246
ui->deleteButton_s->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
248247
}
249-
#endif
250248
}
251249

252250
bool SendCoinsEntry::updateLabel(const QString &address)

src/qt/signverifymessagedialog.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ bool SignVerifyMessageDialog::eventFilter(QObject *object, QEvent *event)
286286

287287
void SignVerifyMessageDialog::changeEvent(QEvent* e)
288288
{
289-
#ifdef Q_OS_MACOS
290289
if (e->type() == QEvent::PaletteChange) {
291290
ui->addressBookButton_SM->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/address-book")));
292291
ui->pasteButton_SM->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/editpaste")));
@@ -297,5 +296,4 @@ void SignVerifyMessageDialog::changeEvent(QEvent* e)
297296
ui->verifyMessageButton_VM->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/transaction_0")));
298297
ui->clearButton_VM->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
299298
}
300-
#endif
301299
}

src/qt/transactionview.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ void TransactionView::setModel(WalletModel *_model)
245245

246246
void TransactionView::changeEvent(QEvent* e)
247247
{
248-
#ifdef Q_OS_MACOS
249248
if (e->type() == QEvent::PaletteChange) {
250249
watchOnlyWidget->setItemIcon(
251250
TransactionFilterProxy::WatchOnlyFilter_Yes,
@@ -254,7 +253,6 @@ void TransactionView::changeEvent(QEvent* e)
254253
TransactionFilterProxy::WatchOnlyFilter_No,
255254
m_platform_style->SingleColorIcon(QStringLiteral(":/icons/eye_minus")));
256255
}
257-
#endif
258256
}
259257

260258
void TransactionView::chooseDate(int idx)

0 commit comments

Comments
 (0)