Commit 7da2b4a3 authored by Alessandro Portale's avatar Alessandro Portale

Startup: Limit devicePixelRatio tweaking to Windows

Setting DEVICE_PIXEL_RATIO on Linux to "auto" will disable font hinting
even on systems with a DPR of 1.

This patch limits our tweak to Windows. On OSX, it works reliably,
anyways.

Task-number: QTCREATORBUG-14516
Change-Id: I3c22c264c7f5019d22e1e3692b6d94c1d0777fc6
Reviewed-by: default avatarPaul Olav Tvete <paul.tvete@theqtcompany.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent b4b902eb
......@@ -292,8 +292,10 @@ static inline QSettings *userSettings()
int main(int argc, char **argv)
{
if (!qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO"))
if (Utils::HostOsInfo().isWindowsHost()
&& !qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO")) {
qputenv("QT_DEVICE_PIXEL_RATIO", "auto");
}
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
#ifdef Q_OS_MAC
// increase the number of file that can be opened in Qt Creator.
......@@ -306,7 +308,8 @@ int main(int argc, char **argv)
SharedTools::QtSingleApplication app((QLatin1String(appNameC)), argc, argv);
if (!qFuzzyCompare(qApp->devicePixelRatio(), 1.0)
if (Utils::HostOsInfo().isWindowsHost()
&& !qFuzzyCompare(qApp->devicePixelRatio(), 1.0)
&& QApplication::style()->objectName().startsWith(
QLatin1String("windows"), Qt::CaseInsensitive)) {
QApplication::setStyle(QLatin1String("fusion"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment