mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +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()) {
|
||||
return QString::number(scale) + '%';
|
||||
} else {
|
||||
const auto ratio = window->widget()->devicePixelRatioF();
|
||||
return QString::number(int(scale * ratio)) + '%';
|
||||
const auto handle = window->widget()->windowHandle();
|
||||
const auto ratio = handle->devicePixelRatio();
|
||||
return QString::number(base::SafeRound(scale * ratio)) + '%';
|
||||
}
|
||||
};
|
||||
label->setText(labelText(cEvalScale(scale)));
|
||||
|
|
Loading…
Add table
Reference in a new issue