mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-19 13:22:02 +02:00
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
This commit is contained in:
commit
02b01651c5
@ -51,6 +51,7 @@
|
|||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
#if defined(QT_STATICPLUGIN)
|
#if defined(QT_STATICPLUGIN)
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
@ -466,6 +467,13 @@ int GuiMain(int argc, char* argv[])
|
|||||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
#endif
|
#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;
|
BitcoinApplication app;
|
||||||
|
|
||||||
/// 2. Parse command-line options. We do this after qt in order to show an error if there are problems parsing these
|
/// 2. Parse command-line options. We do this after qt in order to show an error if there are problems parsing these
|
||||||
|
Loading…
x
Reference in New Issue
Block a user