Relax the check for non square DPI

BUGS: 444168
remotes/origin/release/21.08
Albert Astals Cid 4 years ago
parent 99209e29f7
commit 2002f4e7e9
  1. 2
      core/utils.cpp

@ -51,7 +51,7 @@ QSizeF Utils::realDpi(QWidget *widgetOnScreen)
if (screen) {
const QSizeF res(screen->physicalDotsPerInchX(), screen->physicalDotsPerInchY());
if (res.width() > 0 && res.height() > 0) {
if (qAbs(res.width() - res.height()) / qMin(res.height(), res.width()) < 0.05) {
if (qAbs(res.width() - res.height()) / qMin(res.height(), res.width()) < 0.15) {
return res;
} else {
qCDebug(OkularCoreDebug) << "QScreen calculation returned a non square dpi." << res << ". Falling back";

Loading…
Cancel
Save