Closed ilya-fedin closed 2 years ago
added only as symlinks from (unity 7) indicator-keyboard-*
It looks really weird
It's HiDPi? You try HiDPi branch? On sources used 24px icons size and this size available on Papirus...
it should look like this:
How it's looks with another ayatana indicators? https://github.com/AyatanaIndicators
I didn't find any information about the size in the sources, difficult code to understand... in general, it's strange, ayatana is an appindicator receiver and the size 22px is used there, as standard, here 24px is used in SVG icon files. Why? If you look at other ayatana projects, the icons are taken from the theme and should use the size that corresponds to the working environment.
Maybe it's because you're using 22x22 folder rather than scalable? E.g. Qt provides only sizes specified in folder size names when you use QIcon::availableSizes/QIcon::actualSize on an icon gotten with QIcon::fromTheme that is svg. In other words, if Qt application uses svg icon theme and follows the information from QIcon::availableSizes/QIcon::actualSize, it will think only 22x22 pixmap could be gotten even if the icon is svg one (unless KDE platformtheme is used that provides a list of pre-defined sizes for svg icons). Maybe gtk has similar behavior.
It's HiDPi? You try HiDPi branch?
Yeah, it's HiDPI. I use distro package, checked HiDPI branch - the same result.
QIcon::fromTheme
works fine even without specifying the size of the icons and automatically selects the right one for rendering. Because, in Index.theme, all sizes and directories are specified. As for KDE, there is an unspoken standard size of 22px for the tray (the same as Unity). Other work environments have an undefined size of 16px/22px or 24px. The decision to move icons to the scalable folder (or 128px, which in fact is it) violates the entire logic of our icon theme design, because pixel alignment will be broken and icons will be blurred. Actually, other icons, for example Kotatogram, are displayed correctly and located only in folders 16px/22px and 24px. Kotatogram not exist on scalable folder (or 128px)
You can experiment with Fixed and Scalable values in the HiDPI brunch. https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/blob/HiDPI/Papirus.HiDPI/index.theme But once again I note that other libraries such as QSystemTrayIcon or AppIndicator do not have similar problems.
QIcon::fromTheme
works fine even without specifying the size of the icons and automatically selects the right one for rendering.
No, no, that's far from the truth. Have you actually tried to write something using it? QIcon is just a handle. You need to rasterize the icon with QIcon::pixmap that requires specifying a size. If application follows the information provided by QIcon::availableSizes/QIcon::actualSize and KDE frameworks aren't injected in the environment, the behavior is buggy with svg.
The decision to move icons to the scalable folder
Why to move? Copy them. At least the ayatana ones.
Let's close the topic about Qt, it has absolutely nothing to do with the current issue. I just wanted to tell you that the indicators for the tray are ONLY in folders 16/22/24 and have no problems, unlike ayatana-indicator-keyboard. I discovered the problem in the ayatana-indicator-keyboard repository, but the developers have not responded yet.
As for Scalable, it's a dirty solution because it doesn't meet our requirements, one of them is pixel alignment. Perhaps this will solve the problem (although I'm not sure) for HiDPI displays, but it may cause a number of problems for the standard screen resolution.
Also the folder 128x128
in Papirus Light
is a symbolic link to ../Papirus/128x128
. Creating status/ayatana-indicator-keyboard-*.svg
files (links) in it will break the theme. The symbolic
folder has exactly the same structure.
Yes, we can create a new folder, for example, scalable/status/ayatana-indicator-keyboard-*.svg
. But once again I note that this can cause problems for non-HiDPI displays and violates our HIG.
I'm now test Ubuntu 22.04 Mate LiveCD and all worked fine:
200% scale:
It doesn't look like on your screenshot even without scaling
Maybe you try change vertical panel size (some pixels to up)... On my screen it's 30px
I think you use scale x2 16px icons, but this size not available for indicator-keyboard icons on Papirus, only 22px and 24px.
Helps, kind of...
This size is too big for me though, I use the default 24px panel size.
So my guesses are correct, we need to port the indicator-keyboard icons to the size of 16px. This is more than 150 icons
I explain the problem, ayatana-indicator-keyboard -* now these are symbolic links to indicator-keyboard. But only for the size of 22px, which was previously the default in Unity and 24px, it is most likely XFCE (or the old version of elementaryOS). There was no need for 16px earlier, since GNOME drew the icon programmatically, and other working environments practically did not use this size. Notice how long ago these icons were added: https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/commits/master/Papirus/22x22/panel/indicator-keyboard-En.svg
Well, I installed ayatana-indicator-keyboard by hand as standard MATE keyboard indicator bugs in my distro for some reason
Well, I installed ayatana-indicator-keyboard by hand as standard MATE keyboard indicator bugs in my distro for some reason
It's strange, on Ubuntu MATE original keyboard indicator working good (You seen my screens). Anyway it's not solve this issue. As i say ealier, we need port icons to 16px, becuase HiDPI displays use it. wifi, battery, volume and kotatogram - it,s 16px @2x but ayatana-indicator-keyboard- it's 22px @2x
on Ubuntu MATE original keyboard indicator working good
Yeah, it's specific to my distro, some problem in some dependency apparently, but no one knows which one
Offtopic: @ilya-fedin On your distro this bug reproduced? I'm run Ubuntu Mate and added some icons, but it's not applied for Mate Control Center
Works just fine
hm...
@ilya-fedin У вас точно mate-screensaver , а не xscreenserver, потому как у них траблы с лицензией начались? https://github.com/mate-desktop/mate-screensaver/issues/243
ps aux | grep screensave
ilya 1318 0.0 0.6 379520 42092 ? Sl 17:18 0:00 mate-screensaver
ilya 2442 0.3 0.9 628516 57416 ? Sl 17:32 0:01 mate-screensaver-preferences
ilya 2493 0.7 0.6 163040 41312 ? Sl 17:32 0:02 /nix/store/sddkixv6cxvacw07bcd3ivi2b4jxh47j-mate-screensaver-1.26.1/libexec/mate-screensaver/slideshow --location=/nix/store/sddkixv6cxvacw07bcd3ivi2b4jxh47j-mate-screensaver-1.26.1/share/backgrounds/cosmos
Значит опять убунтовские костыли. Спасибо Илья!
@ilya-fedin added 16px, please try it
This a keyboard layout indicator from Ayatana Indicators project (can be used on e.g. MATE), original icons are here: https://github.com/AyatanaIndicators/ayatana-indicator-keyboard/tree/main/data/icons/scalable/status (they're installed with the same directory layout, i.e. /usr/share/icons/hicolor/scalable/status), they also have a generation script: https://github.com/AyatanaIndicators/ayatana-indicator-keyboard/blob/main/contrib/ayatana-indicator-keyboard-icon-generator.py
Looks like this on my system:![изображение](https://user-images.githubusercontent.com/17829319/161407230-5c87e0f4-e8c8-4fa7-b866-405a71219d14.png)