aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2021-06-22 19:19:50 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2021-06-22 19:24:42 +0000
commitc901d4d8ce7949276da57eacb82b1a3ce40cac27 (patch)
tree8288a2cc71335012d0c290c576f761b7a1e39dd7 /src/qt
parent327e2691f6e0498aa868af965bb4a951c5be17c5 (diff)
downloadbitcoin-c901d4d8ce7949276da57eacb82b1a3ce40cac27.tar.xz
GUI: Enable palette change adaptation on all platforms
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoingui.cpp4
-rw-r--r--src/qt/coincontroldialog.cpp2
-rw-r--r--src/qt/guiutil.cpp2
-rw-r--r--src/qt/overviewpage.cpp2
-rw-r--r--src/qt/rpcconsole.cpp2
-rw-r--r--src/qt/sendcoinsentry.cpp2
-rw-r--r--src/qt/signverifymessagedialog.cpp2
-rw-r--r--src/qt/transactionview.cpp2
8 files changed, 0 insertions, 18 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 3d632ec702..02f7e2a832 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -1173,14 +1173,12 @@ void BitcoinGUI::message(const QString& title, QString message, unsigned int sty
void BitcoinGUI::changeEvent(QEvent *e)
{
-#ifdef Q_OS_MACOS
if (e->type() == QEvent::PaletteChange) {
overviewAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/overview")));
sendCoinsAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/send")));
receiveCoinsAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/receiving_addresses")));
historyAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/history")));
}
-#endif
QMainWindow::changeEvent(e);
@@ -1511,14 +1509,12 @@ void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event)
void UnitDisplayStatusBarControl::changeEvent(QEvent* e)
{
-#ifdef Q_OS_MACOS
if (e->type() == QEvent::PaletteChange) {
QString style = QString("QLabel { color : %1 }").arg(m_platform_style->SingleColor().name());
if (style != styleSheet()) {
setStyleSheet(style);
}
}
-#endif
}
/** Creates context menu, its actions, and wires up all the relevant signals for mouse events. */
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index 2360fa9b37..2ea250d3e9 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -564,11 +564,9 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
void CoinControlDialog::changeEvent(QEvent* e)
{
-#ifdef Q_OS_MACOS
if (e->type() == QEvent::PaletteChange) {
updateView();
}
-#endif
}
void CoinControlDialog::updateView()
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 393dca8ccd..4ccfa5deef 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -809,11 +809,9 @@ void ThemedLabel::setThemedPixmap(const QString& image_filename, int width, int
void ThemedLabel::changeEvent(QEvent* e)
{
-#ifdef Q_OS_MACOS
if (e->type() == QEvent::PaletteChange) {
updateThemedPixmap();
}
-#endif
QLabel::changeEvent(e);
}
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 26e3dd0d60..bc5a050544 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -297,13 +297,11 @@ void OverviewPage::setWalletModel(WalletModel *model)
void OverviewPage::changeEvent(QEvent* e)
{
-#ifdef Q_OS_MACOS
if (e->type() == QEvent::PaletteChange) {
QIcon icon = m_platform_style->SingleColorIcon(QStringLiteral(":/icons/warning"));
ui->labelTransactionsStatus->setIcon(icon);
ui->labelWalletStatus->setIcon(icon);
}
-#endif
}
void OverviewPage::updateDisplayUnit()
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index ff4bfb16f6..68bbb9b963 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -882,7 +882,6 @@ void RPCConsole::keyPressEvent(QKeyEvent *event)
void RPCConsole::changeEvent(QEvent* e)
{
-#ifdef Q_OS_MACOS
if (e->type() == QEvent::PaletteChange) {
ui->clearButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
ui->fontBiggerButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/fontbigger")));
@@ -896,7 +895,6 @@ void RPCConsole::changeEvent(QEvent* e)
platformStyle->SingleColorImage(ICON_MAPPING[i].source).scaled(QSize(consoleFontSize * 2, consoleFontSize * 2), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
}
}
-#endif
}
void RPCConsole::message(int category, const QString &message, bool html)
diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp
index f701bb9615..dc273b8818 100644
--- a/src/qt/sendcoinsentry.cpp
+++ b/src/qt/sendcoinsentry.cpp
@@ -238,7 +238,6 @@ void SendCoinsEntry::updateDisplayUnit()
void SendCoinsEntry::changeEvent(QEvent* e)
{
-#ifdef Q_OS_MACOS
if (e->type() == QEvent::PaletteChange) {
ui->addressBookButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/address-book")));
ui->pasteButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/editpaste")));
@@ -246,7 +245,6 @@ void SendCoinsEntry::changeEvent(QEvent* e)
ui->deleteButton_is->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
ui->deleteButton_s->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
}
-#endif
}
bool SendCoinsEntry::updateLabel(const QString &address)
diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp
index b982cc577d..e8ee11e90f 100644
--- a/src/qt/signverifymessagedialog.cpp
+++ b/src/qt/signverifymessagedialog.cpp
@@ -286,7 +286,6 @@ bool SignVerifyMessageDialog::eventFilter(QObject *object, QEvent *event)
void SignVerifyMessageDialog::changeEvent(QEvent* e)
{
-#ifdef Q_OS_MACOS
if (e->type() == QEvent::PaletteChange) {
ui->addressBookButton_SM->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/address-book")));
ui->pasteButton_SM->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/editpaste")));
@@ -297,5 +296,4 @@ void SignVerifyMessageDialog::changeEvent(QEvent* e)
ui->verifyMessageButton_VM->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/transaction_0")));
ui->clearButton_VM->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
}
-#endif
}
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index 4b1a546c7c..cad3d406fb 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -245,7 +245,6 @@ void TransactionView::setModel(WalletModel *_model)
void TransactionView::changeEvent(QEvent* e)
{
-#ifdef Q_OS_MACOS
if (e->type() == QEvent::PaletteChange) {
watchOnlyWidget->setItemIcon(
TransactionFilterProxy::WatchOnlyFilter_Yes,
@@ -254,7 +253,6 @@ void TransactionView::changeEvent(QEvent* e)
TransactionFilterProxy::WatchOnlyFilter_No,
m_platform_style->SingleColorIcon(QStringLiteral(":/icons/eye_minus")));
}
-#endif
}
void TransactionView::chooseDate(int idx)