forked from qt-creator/qt-creator
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: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -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"));
|
||||
|
Reference in New Issue
Block a user