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:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user