mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-26 11:16:20 +03:00
Don't round scaling factor
Qt 5.14 introduced new feature related to HighDPI screens support, this parameter is called "scale factor rounding policy", and it is intended to improve fractional scale factor support (like 150%). Qt::PassThrough value guarantee that no any rounding will applied to scale factor, and will be used as is.
This commit is contained in:
parent
fcc87b4e9b
commit
a9b0d84df9
1 changed files with 3 additions and 0 deletions
|
@ -136,6 +136,9 @@ int main(int argc, char *argv[])
|
|||
// Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created
|
||||
if (qgetenv("QT_ENABLE_HIGHDPI_SCALING").isEmpty() && qgetenv("QT_AUTO_SCREEN_SCALE_FACTOR").isEmpty())
|
||||
Application::setAttribute(Qt::AA_EnableHighDpiScaling, true);
|
||||
// HighDPI scale factor policy must be set before QGuiApplication is created
|
||||
if (qgetenv("QT_SCALE_FACTOR_ROUNDING_POLICY").isEmpty())
|
||||
Application::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||
#endif
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue