A small patch for JuK to render icons in HiDPI display

Guo Yunhe <[email protected]> Wed, 7 Nov 2018 19:44:41 +0100 (CET)
Newsgroups gmane.comp.kde.users.multimedia
Message-ID <[email protected]>
The patch is very simple. It enables HiDPI icon rendering. Open before.png and after.png (zoom to 100%), you can find the edge of icons are more smooth after patching. The code is copy & pasted from Kaffeine and many KDE applications have made the same change.

-- 
Guo Yunhe / @guoyunhe / guoyunhe.me
hidpi-icon-rendering.patch (text/x-patch, 357 B)
diff --git a/main.cpp b/main.cpp
--- a/main.cpp
+++ b/main.cpp
@@ -110,6 +110,8 @@
         QString message = i18n("JuK running in docked mode\nUse context menu in system tray to restore.");
         KNotification::event("dock_mode",i18n("JuK Docked"), message);
     }
+    
+    a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
 
     return a.exec();
 }
before.png (image/png, 230 KB) - not displayed
after.png (image/png, 230.8 KB) - not displayed