Make default UI scale 120% on macOS Retina.

This commit is contained in:
John Preston 2021-03-15 20:33:41 +04:00
parent 4fc2b1f1a3
commit a909c1a813

View file

@ -209,9 +209,13 @@ void Sandbox::setupScreenScale() {
LOG(("Environmental variables: QT_SCREEN_SCALE_FACTORS='%1'").arg(qEnvironmentVariable("QT_SCREEN_SCALE_FACTORS"))); LOG(("Environmental variables: QT_SCREEN_SCALE_FACTORS='%1'").arg(qEnvironmentVariable("QT_SCREEN_SCALE_FACTORS")));
} }
style::SetDevicePixelRatio(int(ratio)); style::SetDevicePixelRatio(int(ratio));
if (Platform::IsMac() && ratio == 2.) {
cSetScreenScale(120); // 120% for Retina screens by default.
} else {
cSetScreenScale(style::kScaleDefault); cSetScreenScale(style::kScaleDefault);
} }
} }
}
Sandbox::~Sandbox() = default; Sandbox::~Sandbox() = default;