Bug 346956

Summary: Application icons in title bar are blurry
Product: [Plasma] Breeze Reporter: Loïc Yhuel <loic.yhuel>
Component: window decorationAssignee: Hugo Pereira Da Costa <hugo.pereira.da.costa>
Status: RESOLVED WORKSFORME    
Severity: normal CC: hugo.pereira.da.costa
Priority: NOR    
Version First Reported In: 5.3.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: qdbus org.kde.KWin /KWin supportInformation

Description Loïc Yhuel 2015-04-30 13:40:03 UTC
The effect depends on the application and the button size, but one visible case is with konsole and small buttons :
 - kwin4 seems to use /usr/share/icons/oxygen/16x16/apps/utilities-terminal.png (also used by konsole for the tabs)
 - kwin5 seems to take one of the bigger sizes and downscale it

Even the "K" icon in the window decoration preview is blurry !
Comment 1 Thomas Lübking 2015-04-30 13:59:55 UTC
KWin takes the icon that is exported on the window (but may be available in multiple sizes)

-> Which decoration in particular? (what the deco does with the icon pixmaps is up to the deco, so this is relevant)
(in doubt attach the output "qdbus org.kde.KWin /KWin supportInformation")

Since this may be a HiRes issue, what's the output of "xdpyinfo | grep resolution"?
Comment 2 Loïc Yhuel 2015-04-30 14:39:43 UTC
Created attachment 92341 [details]
qdbus org.kde.KWin /KWin supportInformation
Comment 3 Loïc Yhuel 2015-04-30 14:39:56 UTC
The issue seems to be more visible with Oxygen than with Breeze, but it seems both need to resize the icons for at least small and normal button size.
As they don't have the same icon size, I understand there can't be an icon with the exact size for all configurations, but with Oxygen on KDE4 it was the case.
I don't know if Oxygen now uses a different size for the display, or if it selects the wrong icon size as source pixmap.

"xdpyinfo | grep resolution" gives "resolution:    96x96 dots per inch".
Comment 4 Thomas Lübking 2015-04-30 14:50:45 UTC
@Hugo, I didn't check the code, but resizing small images requires lanczos filtering or similar or indeed will inevitably end up being blurry (not to mention scaling up)

Since QImage doesn't provide such, you'll get "best" results scaling down the biggest image you can get (ie. 512 -> 18 >> 24 -> 18), but in doubt, just omit it (since loading/scaling bigger images oc. also has more overhead)
Comment 5 Loïc Yhuel 2015-04-30 15:12:59 UTC
But small icons are sometimes different from bigger ones, with details removed to stay readable and sharp, so it's better if we can use exact sizes (16x16, 22x22, ...).
Oxygen seems to use an intermediate icon size for the small buttons (which roughly matches the KDE4 normal size). In KDE4 the icon size was fixed, now it changes with the button size.
Comment 6 Martin Flöser 2016-10-28 19:37:29 UTC
Reassigning to breeze as KWin cannot do much more than passing the icons to the decoration. The actual rendering is done by the decoration plugin.
Comment 7 Loïc Yhuel 2016-10-28 22:06:01 UTC
(In reply to Martin Gräßlin from comment #6)
> Reassigning to breeze as KWin cannot do much more than passing the icons to
> the decoration. The actual rendering is done by the decoration plugin.
The issue isn't specific to breeze, it also affects oxygen window decorations.
Comment 8 Justin Zobel 2022-10-26 03:07:22 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 9 Bug Janitor Service 2022-11-10 05:11:49 UTC
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!
Comment 10 Bug Janitor Service 2022-11-25 05:22:05 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now 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

Thank you for helping us make KDE software even better for everyone!