mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Ceil device pixel ratio
Qt 6.4 provides QT_WIDGETS_HIGHDPI_DOWNSCALE that allows widgets to draw at integer device pixel ratio by using the next integer. Ceiling this value makes tdesktop in sync with technique and provides sharp content. Without QT_WIDGETS_HIGHDPI_DOWNSCALE, this doesn't makes the content sharp, but the quality is still better as Qt attempts to downscale those graphic rather than upscale.
This commit is contained in:
parent
feb6107ce6
commit
4f261ced8e
1 changed files with 1 additions and 1 deletions
|
@ -243,7 +243,7 @@ void Sandbox::setupScreenScale() {
|
|||
LOG(("Environmental variables: QT_AUTO_SCREEN_SCALE_FACTOR='%1'").arg(qEnvironmentVariable("QT_AUTO_SCREEN_SCALE_FACTOR")));
|
||||
LOG(("Environmental variables: QT_SCREEN_SCALE_FACTORS='%1'").arg(qEnvironmentVariable("QT_SCREEN_SCALE_FACTORS")));
|
||||
}
|
||||
style::SetDevicePixelRatio(int(ratio));
|
||||
style::SetDevicePixelRatio(std::ceil(ratio));
|
||||
if (Platform::IsMac() && ratio == 2.) {
|
||||
cSetScreenScale(110); // 110% for Retina screens by default.
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue