chore: use QT_SCALE_FACOTR set scale factor

see https://doc.qt.io/qt-5/highdpi.html
This commit is contained in:
ck 2024-03-21 10:23:11 +08:00 committed by Comix
parent df502f8293
commit b504363b9d

View File

@ -53,8 +53,7 @@ void ApplicationService::appendExtraEnvironments(QVariantMap &runtimeOptions) co
{
QString oldEnv;
// scale factor
// NOTE: Use QT_SCREEN_SCALE_FACTOR in multi-monitor situations, as this feature may be added in the future
static QStringList scaleEnvs{"DEEPIN_WINE_SCALE=%1;", "QT_SCREEN_SCALE_FACTOR=%1;"};
static QStringList scaleEnvs{"DEEPIN_WINE_SCALE=%1;", "QT_SCALE_FACTOR=%1;"};
auto factor = scaleFactor();
if (auto it = runtimeOptions.find("env"); it != runtimeOptions.cend()) {
oldEnv = it->value<QString>();