Created attachment 114073 [details] Wrong scaling After update to 0.8.0 all icons in task manager have wrong scaling. Version 0.7.x was fine. Previously I used size 96px, now I have 48px. See screenshot attached. I use PLASMA_USE_QT_SCALING=1, because other apps do not scale correctly without it (like original plasma panel). Font DPI is set correctly to 192 DPI. Scaling factor is 2.
> I use PLASMA_USE_QT_SCALING=1, because other apps do not scale correctly without it (like original plasma panel). I suppose you must contact plasma devs and find out how to setup your environment correctly without PLASMA_USE_QT_SCALING=1
Let's say I use icons with size 32px and scale 1. Then I switch scale to 2, I still should be using icons with size 32px, right? Or is pixel always considered physical pixel and then I should use 64px? I'm coming from web world where pixel is considered as virtual pixel and screen density manages how many physical pixels are mapped to virtual pixel.
And when I say plasma panel, I mean System Tray icons which are quite small without PLASMA_USE_QT_SCALING=1. Also right click menu uses small icons which look like 16px icons on HiDPI display. And to make things more confusing, Wayland session seems to do this differently. System Tray icons have correct size and Latte Dock icons have double size. So this actually behaves like I would expect it to.
> PLASMA_USE_QT_SCALING=1, You can't randomly set hidden internal environment variables. Lots of things will be broke. Can you clarify if the Wayland behavior is correct? You used the term double size.
I would like to have latte dock of size 48px. With various settings it works like this: X11 + scale factor 1 + dock size 48px = OK X11 + scale factor 2 + dock size 48px = small icons X11 + scale factor 2 + dock size 96px = OK X11 + scale factor 2 + dock size 48px + PLASMA_USE_QT_SCALING=1 = size OK, but icons have jagged edges Wayland + scale factor 2 + dock size 48px = OK Wayland + scale factor 2 + dock size 96px = large icons I believe that scaling should be done on background and front end application should be using same size of 48px regardless of scale factor. Of course front end application must be aware of scale factor when displaying high resolution content like images or bitmap icons. I'm also attaching another picture. It shows desktop right click menu. In front is my actual desktop and in the background is VirtualBox which basically doubles the size of display without scaling. However as you can see font size about the same (I have font DPI set to 192). But icons on real desktop are only half the size as they should be. When I set PLASMA_USE_QT_SCALING=1, icons are scaled as expected and font size remains the same.
Created attachment 114078 [details] Scaling of desktop right click menu
Update to my previous observations: Wayland + scale factor 2 + dock size 48px = OK, but icons have jagged edges Wayland + scale factor 2 + dock size 96px = large icons, but no jagged edges Wayland + scale factor 2 + dock size 48px + PLASMA_USE_QT_SCALING=1= OK, but icons have jagged edges So it seems that PLASMA_USE_QT_SCALING has no effect in Wayland session.
Things are complex: - plasma does it's own scaling thing making things just bigger based on font size. It was first, but it has a limited scope and is somewhat rubbish (hence context menu being wrong) - Qt has a thing to have a separate physical and virtual pixels within the client app. Mostly fantastic. Used in all apps. Causes a mess for things like panels where we have to communicate between apps or the WM which don't use the same virtual pixels as the client sees. Given we have above, it's disabled in Plasma. - wayland also understands scaling that has the separate virtual and physical pixels. It requires the "qt scaling" above to keep things high res but at least we now use the same virtual pixels between app communication. On wayland we enabled Qt scaling, using the internal env I added. When enabled in general as your virtual font size is now scaled back to 96dpi, Plasma's scaling cancels out. (even if it makes the code a mess) Latte dock being plasma is mostly doing it the "plasma way" but it has a setting in "px" which doesn't fit in within the Plasma font approach and won't cancel out when we enable scaling. Your initial bug. It also /might/ do it's own icon pixmap handling, which needs to be adapted for Qt scaling. (potential jaggedness) ----- In any case, I shall look into fixing latte + wayland having jagged edges. If that happens to fix anything else, great. Otherwise, tough.
Thank you very much for that comprehensive explanation. It certainly made things clearer. So I guess best thing for me will be to wait for Wayland session becoming stable enough to be used daily.
> Wayland + scale factor 2 + dock size 48px = OK, but icons have jagged edges Couldn't reproduce. I turned on Qt's scaling and went up to 4x, it was all smooth. Can you post a screenshot?
Created attachment 114284 [details] latte-wayland-jagged
Created attachment 114285 [details] latte-x11-smooth
Sure. I have added 2 screenshots. One from wayland (Wayland + scale factor 2 + dock size 48px) and one from X11 (X11 + scale factor 2 + dock size 96px). X11 screenshot is 4K, but wayland screenshot was for some unknown reason saved only as full HD. I used Spectacle. Anyway, worst looking icon is Thunderbird. Hopefully you will see what I mean.
Yeah, I can. Can you provide your Plasma + frameworks version numbers please. They can be found in kinfocenter
I have: KDE Plasma: 5.13.3 KDE Frameworks: 5.48.0 Qt: 5.11.1 Kernel: 4.17.9-1-MANJARO OS Type: 64-bit
(In reply to David Edmundson from comment #8) > Latte dock being plasma is mostly doing it the "plasma way" but it has a > setting in "px" which doesn't fit in within the Plasma font approach and > won't cancel out when we enable scaling. Your initial bug. > It also /might/ do it's own icon pixmap handling, which needs to be adapted > for Qt scaling. (potential jaggedness) > > ----- > > In any case, I shall look into fixing latte + wayland having jagged edges. > If that happens to fix anything else, great. Otherwise, tough. I found the thread accidentally... The assumptions are correct, even though Latte is trying to use plasma code directly as much as possible the icons in the Latte taskmanager are painted by Latte. The reason for this was that there was no other way to support the parabolic effect otherwise. The Plasma.IconItem will always paint the best fit icon based on the enabled icon theme. For icons with size lower than 64px. that breaks the smoothness of the parabolic effect. In the end the decision was to fork PlasmaCore.IconItem and follow its development closely in order to update the implementation of Latte.IconItem . The thing is that personally I dont understand very good the painting taking place in IconItem(s) and if something can be done better. The source code for Latte.IconItem can be found here: https://phabricator.kde.org/source/latte-dock/browse/master/liblattedock/iconitem.cpp$295
Latte Tasks in latest git version is using Kirigami.Icons this should not be valid any more.
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
Cool.
Checked it and icons look the same on X11 and Wayland. Thanks a lot.