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
|
@ -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_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")));
|
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.) {
|
if (Platform::IsMac() && ratio == 2.) {
|
||||||
cSetScreenScale(110); // 110% for Retina screens by default.
|
cSetScreenScale(110); // 110% for Retina screens by default.
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue