telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.24k stars 5.21k forks source link

[Feature Request] Notification counter for themed icons on Linux #10407

Closed Shatur closed 1 year ago

Shatur commented 3 years ago

Is your feature request related to a problem?

After version 2.5.5, if the system theme contains a monochrome icon, then the notification counter is not displayed on it.

Before:

изображение

After:

img

This approach may be look nice in some situations, but it is much less practical.

Describe the solution you'd like

It would be nice to add an option that would return the old behavior (displaying notification counter). It would make everyone happy.

As a workaround, users can change the icon theme for Telegram, which does not contain the icon for the system tray. But then the Telegram icon will look different from the rest of the monochrome icons (see how it worked before in the screenshots above).

Additional context

I talked with @ilya-fedin and he said that I should ask @john-preston.

Related issues reported by confused users: #10264, #10251, #10263.

soredake commented 1 year ago

Not stale.

ilya-fedin commented 1 year ago

I believe this should be closed as:

  1. 1.5 years have passed and no one contributed this, as not I nor @john-preston have plans to implement this, it seems this issue will just remain open forever like planned while it's not true. Anyone can contribute this even after the issue will be closed, though (I still can't guarantee the contirbution will be accepted, it's up to @john-preston, so the one who wants this would have to try and see what will happen).
  2. It seems I misunderstood the request. I thought it's a request to disable the monochrome icon and use a colored icon with a counter. Re-reading the report, I see that it's a request to have the counter with a monochrome icon. Such option shouldn't exist in my opinion as it would provide bad UX, the option will bug as soon as the user will try to activate it while using Breeze Twilight theme and we will get bug reports about this. To make this bug-less, one would have to integrate tdesktop with KDE frameworks providing color scheme integration and I don't believe anyone would spend effort on this (the hardest part would be not code but adding the libraries to the static binary build, KDE frameworks tend to have a lot of recursive dependencies). Another way for anyone interested is to contribute to Qt to either add KDE color scheme support (and tdesktop would have it automatically) or add abstraction for the OverlayIconPixmap API of the StatusNotifierItem specification. The latter is way easier, Qt should have everything required already implemented, just lacks an API for tdesktop to use this. But the person who would like to implement this will have to convince Qt developers to add this new public API. If that would be implemented, we won't even need the option, it will be by default, like it was previously.

So I believe we should close this as a platform restriction. The new tray icon spec that is in works doesn't have the possibility to set pixmaps, at all, so it's likely that in future we won't have the tray counter at all on Linux, only those monochrome icons with dots in vector format (it's unrealistic to have counter with the XDG icon theme spec as there would have to be thousands of vector icon files, for each count). The API allows to set absolute path to a raster icon, but that won't be friendly to HiDPI unlike the IconPixmap array in the existing spec, so is not really usable. Setting absolute path to a raster icon usually leads to incompatibility with HiDPI (if e.g. 22px icon is passed) or various tray host bugs, e.g. not downscaling the icon, so it's out of bounds or cropped (that's how e.g. Ubuntu/Ayatana indicators behave right now, they have only the ability to use XDG icon theme spec or pass a path to a raster file, like the new spec). Unfortunately, that's where the Linux stack goes, with the leadership of GNOME and its HIG.

Anyone can contribute an option to disable monochrome icon still, though, if that's something acceptable to anyone, even after this is issue is closed (as I already said, no guarantee it would be merged though, it's not up to me).