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

Device icons for Plasma 6 panel with the same name as real device icon appearing where they shouldn't be #3923

Open
morganist opened this issue Jan 22, 2025 · 4 comments
Assignees

Comments

@morganist
Copy link
Member

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:

Image

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:

Image

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.

@morganist morganist self-assigned this Jan 22, 2025
@morganist morganist pinned this issue Jan 22, 2025
@morganist
Copy link
Member Author

related to #3730

@SmartFinn
Copy link
Member

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.

@morganist
Copy link
Member Author

@SmartFinn what do you mean "classic"? the one in the example?

@SmartFinn
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants