mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Multiple scale values in UI by device pixel ratio on non-Mac
To avoid confusion
This commit is contained in:
parent
5aaa72e8cd
commit
45bbe33929
1 changed files with 6 additions and 1 deletions
|
@ -41,6 +41,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "facades.h"
|
||||
#include "app.h"
|
||||
#include "styles/style_settings.h"
|
||||
#include "base/platform/base_platform_info.h"
|
||||
|
||||
namespace Settings {
|
||||
|
||||
|
@ -249,7 +250,11 @@ void SetupInterfaceScale(
|
|||
};
|
||||
|
||||
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) {
|
||||
return *(ScaleValues.begin() + index);
|
||||
|
|
Loading…
Add table
Reference in a new issue