Skip to content

Commit 02b0165

Browse files
committed
Merge #177: Use "fusion" style on macOS Big Sur with old Qt
4e1154d 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: - bitcoin/bitcoin#20555 (comment) - #136 ACKs for top commit: MarcoFalke: review ACK 4e1154d can't test jarolrod: ACK 4e1154d jonasschnelli: Tested ACK 4e1154d Tree-SHA512: c2e0f7be220c8b34b182c73e362f41d0e8c8c002e766fcb5491c62f3cfb9f70eabbd32b29baefa152135efc5f83b15534c1c2459e500a586b0f64c5aa8acf614
2 parents 9deba2d + 4e1154d commit 02b0165

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/qt/bitcoin.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include <QThread>
5252
#include <QTimer>
5353
#include <QTranslator>
54+
#include <QtGlobal>
5455

5556
#if defined(QT_STATICPLUGIN)
5657
#include <QtPlugin>
@@ -466,6 +467,13 @@ int GuiMain(int argc, char* argv[])
466467
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
467468
#endif
468469

470+
#if (QT_VERSION <= QT_VERSION_CHECK(5, 9, 8)) && defined(Q_OS_MACOS)
471+
const auto os_name = QSysInfo::prettyProductName();
472+
if (os_name.startsWith("macOS 11") || os_name.startsWith("macOS 10.16")) {
473+
QApplication::setStyle("fusion");
474+
}
475+
#endif
476+
469477
BitcoinApplication app;
470478

471479
/// 2. Parse command-line options. We do this after qt in order to show an error if there are problems parsing these

0 commit comments

Comments
 (0)