From 69488f0767cf045e6088f96a83618629dc15962f Mon Sep 17 00:00:00 2001 From: Mika Lindqvist Date: Wed, 28 Aug 2019 10:11:35 +0300 Subject: [PATCH] Enable High DPI scaling support. --- src/Application/WalletApplication.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Application/WalletApplication.cpp b/src/Application/WalletApplication.cpp index 8375dd6..4d95d5d 100644 --- a/src/Application/WalletApplication.cpp +++ b/src/Application/WalletApplication.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2015-2018, The Bytecoin developers // Copyright (c) 2018, The PinkstarcoinV2 developers -// Copyright (c) 2018, The Bittorium developers +// Copyright (c) 2018-2019, The Bittorium developers // // This file is part of Bytecoin. // @@ -106,6 +106,12 @@ WalletApplication::WalletApplication(int& _argc, char** _argv) : QApplication(_a m_systemTrayIcon(new QSystemTrayIcon(this)), m_applicationEventHandler(new ApplicationEventHandler(this)), m_optimizationManager(nullptr), m_blogReader(new BlogReader(this)), m_mainWindow(nullptr), m_splash(nullptr), m_logWatcher(nullptr), m_isAboutToQuit(false) { + if (!qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO") + && !qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR") + && !qEnvironmentVariableIsSet("QT_SCALE_FACTOR") + && !qEnvironmentVariableIsSet("QT_SCREEN_SCALE_FACTORS")) { + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + } setApplicationName("BittoriumWallet"); setApplicationVersion(Settings::instance().getVersion()); setQuitOnLastWindowClosed(false);