mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00: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:
@@ -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)));
|
||||
|
Reference in New Issue
Block a user