Icons installed by apps

Harald Sitter sitter at kde.org
Wed Sep 23 08:31:08 BST 2015


On Wed, Sep 23, 2015 at 12:17 AM, Albert Astals Cid <aacid at kde.org> wrote:
> El Dimarts, 22 de setembre de 2015, a les 23:01:06, Jaroslaw Staniek va
> escriure:
>> On 22 September 2015 at 22:55, Matthias Klumpp <k.matthias12 at gmail.com>
> wrote:
>> > Am 22.09.2015 10:32 nachm. schrieb "Albert Astals Cid" <aacid at kde.org>:
>> >> El Dimarts, 22 de setembre de 2015, a les 14:17:28, Jaroslaw Staniek va
>> >>
>> >> escriure:
>> >> > Hello,
>> >> > A couple of related questions while wrestling with issues such as [1].
>> >> >
>> >> > Let's assume Kexi app installs some icons to
>> >> > PREFIX/share/kexi/icons/oxygen/32x32/places/ or
>> >> > PREFIX/share/kexi/icons/breeze/32x32/places.
>> >> > Can these be searched by the icon engine?
>> >> >
>> >> > In kdelibs4 times PREFIX/share/apps/kexi/icons/oxygen/ was searched at
>> >> > least and icons were used if names were globally unique (overriding
>> >> > mimetype icons did not work).
>> >> >
>> >> > Now in kf5 times I guess I shouldn't install to
>> >> > PREFIX/share/icons/breeze? I do not feel safe with this. I don't even
>> >> > know if it's breeze/ subdir or some other name is guaranteed to exist
>> >> > on a kf5 installation. However if I have guarantees, I am fine with
>> >> > any solution.
>> >>
>> >> Install to hicolor?
>> >
>> > Indeed. If you want to follow the freedesktop spec, hicolor is the place
>> > to
>> > store these icons.
>> > Other tools, like AppStream, will also be able to find the icons then, and
>> > so do all other desktop environments supporting the xdg spec.
>>
>> That's good. Thanks. Now if I try to make icon name unique, I am
>> adding {appname}- prefix.
>> But then {appname} icon (if exists) is used instead. Ideas?
>
> You mean if {appname} and {appname}-foo doesn't right?
>
> the XDG icon spec has some kind of inheritance built into the name so
>
> someaction.png
>
> is chosen if you don't have
>
> someaction-veryspecific.png
>
> So you may want to use another way of prefixing that doesn't mess with that
> like and _ or just nothing at all.

I seem to recall this actually coming up in Randa. IIRC the icon theme
artists would very much prefer if custom icons you want to provide are
using the specification system outlined by the theme spec and are
installed to hicolor. Which then behaves exactly as Albert outlined,
when QIcon resolves for "icon-specific-very" the following order
applies:

icon.png < icon-specific.png < icon-specific-very.png

So you could have places/database-implode-kexi.png which makes the
icon you installed themable as database-implode.png, but at the same
time makes it non-conflicting with other applications that may want to
install database-implode to hicolor.

On a related note, since it came up in the original mail: yes, breeze
is a default fallback in kf5 applications *as long as the
frameworkintegration platformtheme is installed and loaded* [1].
Additionally breeze currently inherits from oxygen, through the theme
config itself, this might go away at some point though. So right now
the effective resolution order is userTheme > breeze > (oxygen) >
hicolor.

HS

[1] http://lxr.kde.org/search?_filestring=&_string=QPlatformTheme%3A%3ASystemIconThemeName



More information about the calligra-devel mailing list