2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Add interface scale (100%..150%) for Retina.

Fixes #69, fixes #3126, fixes #3789.
This commit is contained in:
John Preston
2018-10-15 22:42:10 +03:00
parent f2866442d2
commit 5b4abe69aa
19 changed files with 111 additions and 106 deletions

View File

@@ -1370,11 +1370,7 @@ bool _readSetting(quint32 blockId, QDataStream &stream, int version, ReadSetting
stream >> v;
if (!_checkStreamStatus(stream)) return false;
const auto s = [&] {
if (cRetina()) {
return 100;
}
SetScaleChecked([&] {
constexpr auto kAuto = 0;
constexpr auto kOne = 1;
constexpr auto kOneAndQuarter = 2;
@@ -1388,9 +1384,7 @@ bool _readSetting(quint32 blockId, QDataStream &stream, int version, ReadSetting
case kTwo: return 200;
}
return cRealScale();
}();
cSetConfigScale(s);
cSetRealScale(s);
}());
} break;
case dbiScalePercent: {
@@ -1398,10 +1392,7 @@ bool _readSetting(quint32 blockId, QDataStream &stream, int version, ReadSetting
stream >> v;
if (!_checkStreamStatus(stream)) return false;
if (!v || (v >= 100 && v <= (cRetina() ? 150 : 300) && !(v % 25))) {
cSetConfigScale(v);
cSetRealScale(v);
}
SetScaleChecked(v);
} break;
case dbiLangOld: {