aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-03-03 16:24:49 +0200
committerRiccardo Spagni <ric@spagni.net>2017-03-03 16:24:49 +0200
commit9859f33914120259818ea63973efabc7ccd1473e (patch)
tree80e5164621e4676d07f07258bb1301d53db43f0f /main.cpp
parent9fb884e5a6ea7e6d25af8d84fb8b3d65da248628 (diff)
parente4314ddb4c7cddd31849ea58a609b8b98b21d2fe (diff)
downloadmonzero-gui-9859f33914120259818ea63973efabc7ccd1473e.tar.gz
monzero-gui-9859f33914120259818ea63973efabc7ccd1473e.tar.xz
monzero-gui-9859f33914120259818ea63973efabc7ccd1473e.zip
Merge pull request #514
e4314dd only enable high dpi scaling on qt >= 5.6 (Jaquee) e90c186 Fix high DPI scaling (Jaquee)
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index 7b13d482..486d4338 100644
--- a/main.cpp
+++ b/main.cpp
@@ -64,9 +64,16 @@ void messageHandler(QtMsgType type, const QMessageLogContext &context, const QSt
int main(int argc, char *argv[])
{
- Monero::Wallet::init(argv[0], "monero-wallet-gui");
+ // Enable high DPI scaling on windows & linux
+#if !defined(Q_OS_ANDROID) && QT_VERSION >= 0x050600
+ QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ qDebug() << "High DPI auto scaling - enabled";
+#endif
+ // Log settings
+ Monero::Wallet::init(argv[0], "monero-wallet-gui");
qInstallMessageHandler(messageHandler);
+
QApplication app(argc, argv);
qDebug() << "app startd";