Problem with 32px icons on Plasma widgets
Background
With our effort to adapt Papirus to KDE Plasma 6 in #3663 we allowed all 16px panel icons to also be used in 32px size. This is needed for Plasma system tray, which uses status icons in a bigger size than their variant for panel:
The problem
However, this lead to some icons showing up in undesirable places, replacing perfectly correct icons such as the case with hard drive icon in file managers and GNOME Disks:
USB reader uses a correct device icon, hard disk icons are replaced by their symbolic variants as of Papirus version 20240501. That happens because they have the same name: drive-harddisk.svg. This might seem as an oversight, but turns out this is completely fine within the spec: https://specifications.freedesktop.org/icon-theme-spec/latest/#context Context is everything here. Here is our entry from index.theme for 32px devices folder:
[32x32/devices] Context=Devices Size=32 Type=Fixed
As you can see, the context is correct for this folder. It contains device icons, its context should be device icons. Now let's see our index.theme entry for new symlinked 32px panel icons:
[32x32/panel] Context=Status Size=32 Type=Fixed
They have different context! So the question is, why does the software such as GNOME Disks uses incorrect icons? Does the GTK implementation ignore context? Or is this an issue within Papirus? So, this issue was created in efforts to investigate the problem and, hopefully, find a solution.
related to #3730
Well, the classic implementation of icon lookup doesn't have context parameter at all. See https://specifications.freedesktop.org/icon-theme-spec/latest/#icon_lookup
We can't control what icon to show between two icons with the same filename and same size. So, there is no solution.
@SmartFinn what do you mean "classic"? the one in the example?
@morganist
I mean, there is an implementation that described in specification. If a developer wants to follow the specification, he doesn't have to add context as a parameter for searching an icon.
On Breeze icon theme used monochrome icons for mostly 32px icons, but this icon size not monochrome on Papirus...
It's not -symbolic icons and fully colorfull.
This workaraund need remove... and port 32px status icons form Plasma theme to Papirus
32px - it's not tray icons, it's widgets icons
related issues #3941
I'll take care of this problem... when master branch will be updated
So, there is will be a new directory in 32x32/panel with monochrome icons for Plasma?
@SmartFinn No, these icons should be in the 32/status directory.
Now, as i know 16-22px -symbolic icons used on Apps UI and panel (22px), but if -symbolic icons not exist - used regular icons, but maybe not everywhere... For widgets used regular icons, maybe not all too
As i sayd earlier, they can add + "-symbolic" suffix and it's can be spoiled...
I adhere to the standard, we have 32px non-monochrome icons, and therefore they should be in the status folder...
Now it's mixed, for example Plasma Vault code:
But KDE Connect use kde-connect-tray-symbolic if not exist use kde-connect-tray:
Maybe need delete some -symbolic icons for better looking...
@varlesh But KDE Connect use kde-connect-tray-symbolic if not exist use kde-connect-tray
Not correct. It says use kde-connect-tray-symbolic if inPanel, if not inPanel use kde-connect-tray.
i'm confused... Now on local PC have: kde-connect-tray-symbolic 16-22-32, and kde-connect-tray 16-22, i'm create kde-connect-tray on status folder.
Result:
if i'm rename kde-connect-tray to kde-connect-tray-symbolic on status folder
Result:
it's symbolic icon!
@varlesh only in case the widget placed to panel. On the desktop, it's not adding -symbolic to the icon names.
it's not desktop... it's tray menu
i'm remove kdeconnect-tray-symbolic - and all fine, on tray menu used 32px from status, on panel used monochrome icon!
I told you, you misunderstood the code. Ask ChatGPT to explain if you don't believe me.
@SmartFinn Да пофиг. Я уже портирую 32px значки для виджетов. По факту это значок панели, да но 32px. Потому что у нас 32px не монохром! Там малого того статусы задействованны, так еще и значк из устройств, категорий, мест, да всего чего угодно. Это обход... Подобная реализация была у меня в Материи
Либо нам надо фигачить все 32px, кроме apps в монохром!
@SmartFinn а ты меня убьёшь если я в 32/status добавлю обычный значок с суффиксом -symbolic?
т.е. в 22px -symbolic будет монохром, а 32px -symbolic будет обычный...
@varlesh i don't see a reason why. Check the Breeze theme, I sure that icon is a monochrome.
@SmartFinn Причина в том, что меня бесит монохром размером 32px и если у kdeconnect есть отдельная иконка для трея и тут можно обыграть ситуацию, то вот для этой plasmavault юзается одно имя. Потому как у нас 32px идёт симлинком на 16px, а потому он их юзает
@varlesh
As in case with kdeconnect, it uses symbolic icon only when inPanel variable set.
I see consistency in these two cases.
Даже если я удалю plasmavault-symbolic из 16px, он один хрен берёт 22px и начинает ее масштабировать
Вот другой код, все значки лежат и в symbolic и в status:
почему бляха здесь не юзается -symbolic значок!? У меня мозг уже взрывается
@varlesh see inside symbolicizeIconName function. Seems it adds -symbolic.