sbragin added a comment.
In D10415#204346 <https://phabricator.kde.org/D10415#204346>, @cullmann wrote: > In our company we use the logicalDpiX()/logicalDpiY() on the widget we paint to, that works on macOS, too. > > I assume the physicalDotsPerInchY() should work the same. I think they are not exactly the same. physicalDotsPerInchY() would give twice difference in the resolution depending on whether one uses the native or HiDPI mode. But logicalDpiX()/logicalDpiY() would return the same value in both cases. > Sidenote: do we need to go over QScreen? We just use the function of the widget in question which is there via QPaintDevice. > Which here would be just widgetOnScreen->physicalDpi.... Well, that's a relevant question, but should be addressed to the Okular developers. I just kept the code that was already there. REPOSITORY R223 Okular BRANCH master REVISION DETAIL https://phabricator.kde.org/D10415 To: sbragin, #okular, rjvbb Cc: rjvbb, cullmann, aacid, kde-mac, ltoscano, #okular, michaelweghorn, ngraham