2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 07:25:46 +00:00

Multiple scale values in UI by device pixel ratio on non-Mac

To avoid confusion
This commit is contained in:
Ilya Fedin
2021-10-25 19:04:48 +04:00
committed by John Preston
parent 5aaa72e8cd
commit 45bbe33929

View File

@@ -41,6 +41,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "facades.h" #include "facades.h"
#include "app.h" #include "app.h"
#include "styles/style_settings.h" #include "styles/style_settings.h"
#include "base/platform/base_platform_info.h"
namespace Settings { namespace Settings {
@@ -249,7 +250,11 @@ void SetupInterfaceScale(
}; };
const auto label = [](int scale) { const auto label = [](int scale) {
return QString::number(scale) + '%'; if constexpr (Platform::IsMac()) {
return QString::number(scale) + '%';
} else {
return QString::number(scale * cIntRetinaFactor()) + '%';
}
}; };
const auto scaleByIndex = [](int index) { const auto scaleByIndex = [](int index) {
return *(ScaleValues.begin() + index); return *(ScaleValues.begin() + index);