Icons installed by apps
Jaroslaw Staniek
staniek at kde.org
Thu Sep 24 17:05:21 BST 2015
On 24 September 2015 at 10:40, Harald Sitter <sitter at kde.org> wrote:
> 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).
>
Thanks for the explanation Harald.
I'll try to study it some more if time permits.
Please let me share what I did yesterday before you replied. I forced
Kexi 3 to use kexi_ox_ prefix to use a few oxygen-compatible custom
icons (i.e. coming from Kexi 2.x) when non-breeze theme is in use. It
works and gives high degree of control but if I understand correctly
in the same time probably platform integration (how to check if it's
in use?) made breeze icons the default: http://i.imgur.com/1jyoxGU.png
For example "document-open" has been searched in breeze/ subdirs and
of course it's been located there.
Does this mean for custom icons I should detect if _effective_ theme
is breeze, not just actually set?
PS: I see there are risks of having inconsistencies if an app is not
running under KDE workspace or the workspace has no integration. For
Kexi I am considering another approach not yet tried: hard-default to
breeze (up to dependency on breeze package) and refer to this look in
any docs and so on.
Then add optionality: initiate development of a plugin package(s) that
adds support for other themes. This development could be picked up by
volunteers interested enough in integration with 'their' look and feel
so they maintain the plugin.
In my plans hard-defaulting to breeze is the case already on Windows
and Mac anyway. I am fully aware how someone can call these things
controversial.
Please consider this as an experiment, so much time could be saved for
other tasks.
--
regards, Jaroslaw Staniek
KDE:
: A world-wide network of software engineers, artists, writers, translators
: and facilitators committed to Free Software development - http://kde.org
Calligra Suite:
: A graphic art and office suite - http://calligra.org
Kexi:
: A visual database apps builder - http://calligra.org/kexi
Qt Certified Specialist:
: http://www.linkedin.com/in/jstaniek
More information about the calligra-devel
mailing list