mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 07:56:03 +00:00
Use variables from style namespace instead of hardcoded scale limits
This commit is contained in:
@@ -244,12 +244,12 @@ void Sandbox::setupScreenScale() {
|
||||
LOG(("Computed screen scale: %1").arg(screenScale));
|
||||
if (Platform::IsMac()) {
|
||||
// 110% for Retina screens by default.
|
||||
cSetScreenScale((useRatio == 2) ? 110 : 100);
|
||||
cSetScreenScale((useRatio == 2) ? 110 : style::kScaleDefault);
|
||||
} else {
|
||||
const auto clamped = std::clamp(
|
||||
screenScale * useRatio,
|
||||
50 * useRatio,
|
||||
300);
|
||||
style::kScaleMin * useRatio,
|
||||
style::kScaleMax);
|
||||
cSetScreenScale(int(base::SafeRound(clamped * 1. / useRatio)));
|
||||
}
|
||||
LOG(("DevicePixelRatio: %1").arg(useRatio));
|
||||
|
Reference in New Issue
Block a user