Bug 459937

Summary: Okular looks blurry on macOS with Retina display
Product: [Applications] okular Reporter: Stefan Cooper <stefan.public.email.not.shown>
Component: generalAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: major    
Priority: NOR    
Version First Reported In: 21.08.3   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Top: Observed result, Bottom: Expected result

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.