mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Use variables from style namespace instead of hardcoded scale limits
This commit is contained in:
parent
20f946f657
commit
6e89d41d58
1 changed files with 3 additions and 3 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue