Commit 2002f4e7 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Relax the check for non square DPI

BUGS: 444168
parent 99209e29
Pipeline #90653 passed with stage
in 26 minutes and 47 seconds
......@@ -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";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment