Telegram icon is not blurred
Telegram icon is blurred
Operating system: Kubuntu 20.04
Version of Telegram Desktop: 2.1.5
Installation source (Linux Only) - the official website / GitHub releases / flatpak / snap / distribution package: Website

Looks like your icon theme has icons for all apps on the screenshot except Telegram
I think this link would be very helpful https://bugs.kde.org/show_bug.cgi?id=351055
It can be fixed by the application itself.
It can be fixed by the application itself.
Please, TL;DR, what is needed?
An app should provide correct/good icon to kwin.
Please, read comments 34-35
https://bugs.kde.org/show_bug.cgi?id=351055#c34
An app should provide correct/good icon to kwin.
tdesktop provides 256px icon. Is this good/correct?
Unfortunately, I don't know :(
I've found more information about the bug.
https://www.reddit.com/r/kde/comments/9kz6gv/please_make_kwin_automatically_recognise_correct/
TL;DR:
https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
An application should conform to the XDG icon theme standard.
tdesktop installs icon to ~/.local/share/icons
Okay, it seems, I've found the right answer.
The window should set _NET_WM_ICON property.
https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html
_NET_WM_ICON CARDINAL[][2+n]/32
This is an array of possible icons for the client. This specification does not stipulate what size these icons should be, but individual desktop environments or toolkits may do so. The Window Manager MAY scale any of these icons to an appropriate size.
This is an array of 32bit packed CARDINAL ARGB with high byte being A, low byte being B. The first two cardinals are width, height. Data is in rows, left to right and top to bottom.
You can inspect the properties of other application windows by using the xprop CLI.
Also, I have a problem with the tray icon.

But it's a cool story of another investigation :)
Maybe you know where that icon is located to save my time?
The window should set
_NET_WM_ICONproperty.
It is set, otherwise there wouldn't be any icon
Also, I have a problem with the tray icon.
It is set, otherwise there wouldn't be any icon
Yes, but there is only one 48x48 icon. Firefox has six icons.
Yes, but there is only one 48x48 icon. Firefox has six icons.
As you can see, 256px icon is set. If Qt resizes it, tdesktop can't do anything with that.
https://github.com/telegramdesktop/tdesktop/blob/15041368287931e09cac95c36d06eea27626e150/Telegram/SourceFiles/window/main_window.cpp#L301
https://github.com/telegramdesktop/tdesktop/blob/15041368287931e09cac95c36d06eea27626e150/Telegram/SourceFiles/window/main_window.cpp#L109
https://github.com/telegramdesktop/tdesktop/blob/15041368287931e09cac95c36d06eea27626e150/Telegram/SourceFiles/core/application.h#L118-L120
https://github.com/telegramdesktop/tdesktop/blob/15041368287931e09cac95c36d06eea27626e150/Telegram/SourceFiles/core/application.cpp#L100
https://github.com/telegramdesktop/tdesktop/blob/15041368287931e09cac95c36d06eea27626e150/Telegram/SourceFiles/window/main_window.cpp#L52-L54
I googled more and what I found out.
It's a specific problem of integration Qt applications with KDE.
Here the same issue https://github.com/CDrummond/cantata/issues/1206
And here the workaround https://github.com/CDrummond/cantata/commit/73b48c34894f486241a3dbdba14a7bbfca130a10
But he just added a 128px png, tdesktop already sets 256px png.
Ok. I give up. I hope there would be someone more opinionated in Qt than me, who digs deeper into Cantana's master branch and find the workaround. Let's leave this issue open.
I did some testing. 128x128px icon appears in xprop only with KDE platfromtheme plugin, that can't be used with binary from github. Sorry.
@Aokromes can you close this as 3rd party bug?
Well, I tried to patch Qt and icon is 48x48 anyway
Icon is OK on snap
Icon is OK on flatpak
And only static binary is blurred
Well, I found the root of the problem. It is /usr/share/icons/breeze/apps/48/telegram.svg. KDE developers for some reason provide telegram icon in breeze with 48px size only that overrides telegram's 256px icon. Probably, you should open a bug in KDE bugtracker.
Thank you so much!