Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubuntu large icon task switcher #7917

Closed
bibendi opened this issue May 20, 2020 · 25 comments
Closed

Kubuntu large icon task switcher #7917

bibendi opened this issue May 20, 2020 · 25 comments

Comments

@bibendi
Copy link

bibendi commented May 20, 2020

Steps to reproduce

  1. Go to System Settings - Window Managment - Task Switcher
  2. Choose Large Icons
  3. Change window by pressing Alt+Tab

Expected behaviour

Telegram icon is not blurred

Actual behaviour

Telegram icon is blurred

Configuration

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

Screenshot_20200520_113259

@ilya-fedin
Copy link
Contributor

ilya-fedin commented May 20, 2020

Looks like your icon theme has icons for all apps on the screenshot except Telegram

@bibendi
Copy link
Author

bibendi commented May 20, 2020

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.

@ilya-fedin
Copy link
Contributor

It can be fixed by the application itself.

Please, TL;DR, what is needed?

@bibendi
Copy link
Author

bibendi commented May 20, 2020

An app should provide correct/good icon to kwin.

Please, read comments 34-35
https://bugs.kde.org/show_bug.cgi?id=351055#c34

@ilya-fedin
Copy link
Contributor

An app should provide correct/good icon to kwin.

tdesktop provides 256px icon. Is this good/correct?

@bibendi
Copy link
Author

bibendi commented May 20, 2020

Unfortunately, I don't know :(

@bibendi
Copy link
Author

bibendi commented May 28, 2020

I've found more information about the bug.

https://www.reddit.com/r/kde/comments/9kz6gv/please_make_kwin_automatically_recognise_correct/

TL;DR:

  • An application should conform to the XDG icon theme standard.

https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html

  • A user can fix it for himself:
  1. Right click on title bar > more actions > special application settings > Appearances and fixes
  2. Enable Desktop file name + Select "Force" and specify the desktop file name

@ilya-fedin
Copy link
Contributor

An application should conform to the XDG icon theme standard.

tdesktop installs icon to ~/.local/share/icons

@bibendi
Copy link
Author

bibendi commented May 28, 2020

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.

@bibendi
Copy link
Author

bibendi commented May 28, 2020

Also, I have a problem with the tray icon.

image

But it's a cool story of another investigation :)
Maybe you know where that icon is located to save my time?

@ilya-fedin
Copy link
Contributor

The window should set _NET_WM_ICON property.

It is set, otherwise there wouldn't be any icon

@ilya-fedin
Copy link
Contributor

Also, I have a problem with the tray icon.

#7399

@bibendi
Copy link
Author

bibendi commented May 28, 2020

It is set, otherwise there wouldn't be any icon

Yes, but there is only one 48x48 icon. Firefox has six icons.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented May 28, 2020

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.

_icon = CreateIcon(&account());

auto image = Core::IsAppLaunched() ? Core::App().logo() : LoadLogo();

QImage logo() const {
return _logo;
}

, _logo(Window::LoadLogo())

QImage LoadLogo() {
return QImage(qsl(":/gui/art/logo_256.png"));
}

@bibendi
Copy link
Author

bibendi commented May 28, 2020

I googled more and what I found out.
It's a specific problem of integration Qt applications with KDE.
Here the same issue CDrummond/cantata#1206
And here the workaround CDrummond/cantata@73b48c3

@ilya-fedin
Copy link
Contributor

ilya-fedin commented May 28, 2020

But he just added a 128px png, tdesktop already sets 256px png.

@bibendi
Copy link
Author

bibendi commented May 28, 2020

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.

@ilya-fedin
Copy link
Contributor

I did some testing. 128x128px icon appears in xprop only with KDE platfromtheme plugin, that can't be used with binary from github. Sorry.

@ilya-fedin
Copy link
Contributor

@Aokromes can you close this as 3rd party bug?

@ilya-fedin
Copy link
Contributor

@ilya-fedin
Copy link
Contributor

Well, I tried to patch Qt and icon is 48x48 anyway

@ilya-fedin
Copy link
Contributor

Icon is OK on snap
Icon is OK on flatpak
And only static binary is blurred

@ilya-fedin
Copy link
Contributor

ilya-fedin commented May 29, 2020

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.

@bibendi
Copy link
Author

bibendi commented May 30, 2020

Thank you so much!

https://bugs.kde.org/show_bug.cgi?id=422253

@github-actions
Copy link

github-actions bot commented Mar 5, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants