aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2021-01-28 10:07:29 +0100
committerJonas Schnelli <dev@jonasschnelli.ch>2021-01-28 10:07:33 +0100
commit02b01651c56239db227bd58e85bc3174cda64519 (patch)
tree0afff58098660c2e9efaa8edece91ac03984252f /src/qt
parent9deba2de764f0043061d68cc3b984b9df67cf23b (diff)
parent4e1154dfd128cbada65e9ea08ee274cdeafc4c53 (diff)
downloadbitcoin-02b01651c56239db227bd58e85bc3174cda64519.tar.xz
Merge bitcoin-core/gui#177: Use "fusion" style on macOS Big Sur with old Qt
4e1154dfd128cbada65e9ea08ee274cdeafc4c53 qt: Use "fusion" style on macOS Big Sur with old Qt (Hennadii Stepanov) Pull request description: The "macintosh" style is broken on macOS Big Sur: - https://github.com/bitcoin/bitcoin/issues/20555#issuecomment-756264648 - #136 ACKs for top commit: MarcoFalke: review ACK 4e1154dfd128cbada65e9ea08ee274cdeafc4c53 can't test jarolrod: ACK 4e1154dfd128cbada65e9ea08ee274cdeafc4c53 jonasschnelli: Tested ACK 4e1154dfd128cbada65e9ea08ee274cdeafc4c53 Tree-SHA512: c2e0f7be220c8b34b182c73e362f41d0e8c8c002e766fcb5491c62f3cfb9f70eabbd32b29baefa152135efc5f83b15534c1c2459e500a586b0f64c5aa8acf614
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 8efb0e35d0..d6d5ba6968 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -51,6 +51,7 @@
#include <QThread>
#include <QTimer>
#include <QTranslator>
+#include <QtGlobal>
#if defined(QT_STATICPLUGIN)
#include <QtPlugin>
@@ -466,6 +467,13 @@ int GuiMain(int argc, char* argv[])
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
+#if (QT_VERSION <= QT_VERSION_CHECK(5, 9, 8)) && defined(Q_OS_MACOS)
+ const auto os_name = QSysInfo::prettyProductName();
+ if (os_name.startsWith("macOS 11") || os_name.startsWith("macOS 10.16")) {
+ QApplication::setStyle("fusion");
+ }
+#endif
+
BitcoinApplication app;
/// 2. Parse command-line options. We do this after qt in order to show an error if there are problems parsing these