mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Present window's devicePixelRatio in the UI
It's a more valid value when Qt's rater downscaling is in effect Also round it
This commit is contained in:
parent
9d3715a36a
commit
879df6e6a3
1 changed files with 3 additions and 2 deletions
|
@ -474,8 +474,9 @@ void SetupInterfaceScale(
|
||||||
if constexpr (Platform::IsMac()) {
|
if constexpr (Platform::IsMac()) {
|
||||||
return QString::number(scale) + '%';
|
return QString::number(scale) + '%';
|
||||||
} else {
|
} else {
|
||||||
const auto ratio = window->widget()->devicePixelRatioF();
|
const auto handle = window->widget()->windowHandle();
|
||||||
return QString::number(int(scale * ratio)) + '%';
|
const auto ratio = handle->devicePixelRatio();
|
||||||
|
return QString::number(base::SafeRound(scale * ratio)) + '%';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
label->setText(labelText(cEvalScale(scale)));
|
label->setText(labelText(cEvalScale(scale)));
|
||||||
|
|
Loading…
Add table
Reference in a new issue