Bug 459937 - Okular looks blurry on macOS with Retina display
Summary: Okular looks blurry on macOS with Retina display
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 21.08.3
Platform: macOS (DMG) macOS
: NOR major
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-03 09:33 UTC by Stefan Cooper
Modified: 2022-10-03 09:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Top: Observed result, Bottom: Expected result (927.53 KB, image/png)
2022-10-03 09:33 UTC, Stefan Cooper
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Cooper 2022-10-03 09:33:13 UTC
Created attachment 152561 [details]
Top: Observed result, Bottom: Expected result

STEPS TO REPRODUCE
1. Download Okular from here: https://binary-factory.kde.org/job/Okular_Release_macos/lastStableBuild/
  (I downloaded build #792)
2. Start okular after installing it

OBSERVED RESULT

The resolution of the Okular app interface looks blurry (e.g. the fonts or icons) on my Retina screen and the PDF also seems blurry.
It also seems that the dark mode is not supported.

EXPECTED RESULT

Sharp resolution of the Okular app and at least the default light mode of the app if it does not support dark mode.

SOFTWARE/OS VERSIONS
macOS: 12.6 (Monterey)

(inside "About okular")
Okular Version: 21.08.3
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2 (built against 5.15.2)

PROPOSED SOLUTION

Edit the Info.plist inside okular.app/Contents/Info.plist and add following 3 keys & values:

<key>NSRequiresAquaSystemAppearance</key>
<true/>

<key>NSPrincipalClass</key>
<string>NSApplication</string>

<key>NSHighResolutionCapable</key>
<true/>

This seems to work for me, but it may not work for everyone.
These are the reasons why I added those 3 keys & values:

 * I found this in the docs from qt which might help in terms of the Hi-DPI problem on Retina screens: https://doc.qt.io/qt-5/highdpi.html#macos-and-ios
 * I found this in the docs from Apple (notice the section "Opt Out of Dark Mode"): https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_macos_app


In the attachments you can see the before & after result of my changes to the Info.plist.