Allow disabling custom scaling by envvar.
This commit is contained in:
parent
e824bb2f6b
commit
bc62f87f0e
2 changed files with 9 additions and 0 deletions
|
|
@ -180,4 +180,11 @@ QPixmap PixmapFromImage(QImage &&image) {
|
||||||
return QPixmap::fromImage(std::move(image), Qt::ColorOnly);
|
return QPixmap::fromImage(std::move(image), Qt::ColorOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DisableCustomScaling() {
|
||||||
|
qunsetenv("QT_DEVICE_PIXEL_RATIO");
|
||||||
|
qunsetenv("QT_SCALE_FACTOR");
|
||||||
|
qunsetenv("QT_AUTO_SCREEN_SCALE_FACTOR");
|
||||||
|
qunsetenv("QT_SCREEN_SCALE_FACTORS");
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Ui
|
} // namespace Ui
|
||||||
|
|
|
||||||
|
|
@ -192,4 +192,6 @@ QPointer<const Widget> MakeWeak(not_null<const Widget*> object) {
|
||||||
|
|
||||||
[[nodiscard]] QPixmap PixmapFromImage(QImage &&image);
|
[[nodiscard]] QPixmap PixmapFromImage(QImage &&image);
|
||||||
|
|
||||||
|
void DisableCustomScaling();
|
||||||
|
|
||||||
} // namespace Ui
|
} // namespace Ui
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue