Skip to content

Commit

Permalink
Merge pull request #32 from middlingphys/fix_EnableHighDpiScaling_war…
Browse files Browse the repository at this point in the history
…ning

qt: Set AA_EnableHighDpiScaling attribute early
  • Loading branch information
yentencoin authored Jan 6, 2023
2 parents ffe7b7a + 2f18813 commit 87c15d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/qt/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,13 +562,12 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(bitcoin);
Q_INIT_RESOURCE(bitcoin_locale);

BitcoinApplication app(argc, argv);
#if QT_VERSION > 0x050100
// Generate high-dpi pixmaps
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
#if QT_VERSION >= 0x050600
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
#ifdef Q_OS_MAC
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
Expand All @@ -581,6 +580,8 @@ int main(int argc, char *argv[])
QSslConfiguration::setDefaultConfiguration(sslconf);
#endif

BitcoinApplication app(argc, argv);

// Register meta types used for QMetaObject::invokeMethod
qRegisterMetaType< bool* >();
// Need to pass name here as CAmount is a typedef (see http://qt-project.org/doc/qt-5/qmetatype.html#qRegisterMetaType)
Expand Down

0 comments on commit 87c15d9

Please sign in to comment.