mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 07:56:03 +00:00
Fix initial scale counting from dpi.
This commit is contained in:
@@ -241,7 +241,10 @@ void Sandbox::setupScreenScale() {
|
||||
// 110% for Retina screens by default.
|
||||
cSetScreenScale((useRatio == 2) ? 110 : 100);
|
||||
} else {
|
||||
const auto clamped = std::clamp(screenScale, 50 * useRatio, 300);
|
||||
const auto clamped = std::clamp(
|
||||
screenScale * useRatio,
|
||||
50 * useRatio,
|
||||
300);
|
||||
cSetScreenScale(int(base::SafeRound(clamped * 1. / useRatio)));
|
||||
}
|
||||
LOG(("DevicePixelRatio: %1").arg(useRatio));
|
||||
|
Reference in New Issue
Block a user