Icons installed by apps

Harald Sitter sitter at kde.org
Thu Sep 24 09:40:09 BST 2015


On Wed, Sep 23, 2015 at 11:27 PM, Jaroslaw Staniek <staniek at kde.org> wrote:
>>> Thirdly, I suppose it's possible to indicate in the code that I am
>>> looking for a "place" icon group for example. That would slash the
>>> number of lookups and also limit conflicts. Maybe that would be a
>>> violation of behaviour required by fd.o? No idea.
>>>
>>> My fresh test results in one observation, network-server-database-kexi
>>> which causes the above 515 stat()'s
>>> sits in share/icons/hicolor/22x22/places/network-server-database-kexi.svg.
>>> It is not found, instead
>>> share/icons/breeze/places/22/network-server-database.svg is returned.
>>> This is maybe because network-server-database is a prefix equal to an
>>> existing icon? Why is it of higher priority than the exact match?
>>
>> You mean that breeze/network-server-database.svg is picked over
>> hicolor/network-server-database-kexi.svg when requesting network-server-
>> database-kexi ?
>
> Yes. Strace shows no attempts to find network-server-database-kexi from hicolor.

This is absolutely intentional and in fact why you ought to use the
suffix notation. The idea behind this and really the entire fd.o specs
regarding icons is that your application can be themed to match its
environment 100%. network-server-database[breeze] outranks
network-server-database-kexi[hicolor] because breeze > hicolor. In
GTKish environments it would use whatever icon theme is set there. If
one were to provide a platformtheme for OSX to resolve icons with that
would then outscore hicolor, and so on and so forth.

The resolution order:
- network-server-database-kexi[breeze]
- network-server-database[breeze]
- network-server[breeze]
- network[breeze]
[...fallbacks of breeze...]
- network-server-database-kexi[hicolor]
- network-server-database[hicolor]
- network-server[hicolor]
- network[hicolor]

You get the idea.
As for why that matters have a look at
https://mail.kde.org/pipermail/amarok-devel/2015-July/013499.html for
some thoughts on the theming problem.

So, I will wholeheartedly encourage you to install hicolor icons as a
platform independent fallback in case the QPA platform theme for
frameworks is not installed. BUT do so using the suffix notation so
that the VDG can fully icon theme Kexi to visually integrate with the
Breeze style if the theme plugin is available, otherwise the
application will look foreign and partly themed in hicolor and breeze
at the same time (as seen with Amarok above).

HS



More information about the calligra-devel mailing list