2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Set QT_DPI_ADJUSTMENT_POLICY for older Qt to the new default value

This commit is contained in:
Ilya Fedin
2023-02-11 07:37:11 +04:00
committed by John Preston
parent 0b100884fc
commit 13a9920c11

View File

@@ -320,6 +320,10 @@ void Launcher::init() {
}
void Launcher::initHighDpi() {
#if QT_VERSION < QT_VERSION_CHECK(6, 2, 0)
qputenv("QT_DPI_ADJUSTMENT_POLICY", "AdjustDpi");
#endif // Qt < 6.2.0
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
if (OptionFractionalScalingEnabled.value()) {
QApplication::setHighDpiScaleFactorRoundingPolicy(