RCC for icons - update: Re: Icons installed by apps

Jaroslaw Staniek staniek at kde.org
Thu Feb 18 18:47:04 GMT 2016


On 18 February 2016 at 14:51, René J.V. <rjvbertin at gmail.com> wrote:

> On Thursday February 18 2016 13:55:18 Jaroslaw Staniek wrote:
>
> >>> > since QIcon::fromTheme() apaprently isn't able to find app icons.
>
> Care to explain? QIcon::fromTheme() doesn't find anything "out of the box"
> on OS X (and I presume on MS Windows), but that is only because no theme
> search path is set on those platforms. When you add the standard XDG icon
> repository to the icon search path on OS X, even "pure" Qt5 application
> will start showing icons all over if you have an icon theme installed --
> including in widgets that should not have icons according to the HIG.
>

​Sure but we all agree that outside of desktops adjusted for the taste of
geeks XDG isn't
part of these OSes. I don't plan to bundle shared theme dir or support that
for users by default. I'd leave that to extensions maintained by
enthusiasts :)


Also on OS X, fromTheme() will only return the application icon (as in the
> icon shown in the Finder) if the current theme defines that same icon for
> the calling application, and the theme search path is set of course. In all
> other cases it will not, because the application icon is not defined
> through a theme on OS X (nor is it on MS Windows, I presume).
>
> >> I think the solution with a packaged breeze icons resource working
> >> out-of-the box could be a good (lightweight) addition for non-Plasma
> >> (non-Linux?) users of KF5, to popularize KF5. They grab the icons
> package
>
> Popularise, with Breeze "art"work? O:-)
>

Yes but mainly in the Qt (so also KDE) world :) ​I hope that making any
valuable Qt app look more pro thanks to that is even better investment than
popularizing GIMP and LibreOffice via that artwork before even Qt/KDE
equivalents are shipped in stable on Win/Mac (Krita, Calligra).


> Anyway,  I don't think "grabbing an icon package" will work on OS X, not
> if you want to create standalone app bundles which by definition contain
> everything they need.
>

​What I mean is "grabbing an​

​icon package by software devs", not users. Adding the self-contained theme
to the package would be a matter of 'a few clicks' (it's also legal becase
that's combination within a media, not linking).
​

>
> >> and icons just work without thousands of files, caching, etc. 'One in a
> >> million' would of these users would be interested in theming.
>
> I'd up that estimate if we're still talking about Breeze icons here O:-)
>

I mean one instance of the icon package, that uses Breeze.
Anyone is free to create similarly complete package out of other theme but
this should not be a trouble for app authors. I'd propose to delegate this
out of the app projects.
​


>
> >> PS2: I have been beaten by situations such as KToolBar setting 0-size
> >> icons by default.
>
> Partly this is because almost no KF5 code uses the fallback argument of
> QIcon::fromTheme() explicitly, which means that the function returns an
> empty icon if the search fails.
> In particular, statements like
>
> app->setWindowIcon(QIcon::fromTheme(programName))
>
> should read
>
> app->setWindowIcon(QIcon::fromTheme(programName, app->windowIcon()))
>
>
> >> This is in a Windows env where no themes are (properly) installed. If
> the
> >> rcc-based solution is in use I would imagine that ideally all the KF5
> code
> >> detects this somehow and would not look for xdg standard themes through
> the
> >> classic KIconLoader but silently adapt so the rcc resource works great.
> >> Just a dream.
>
> If your rcc resource corresponds to the resource mentioned in the
> QIcon::fromTheme() documentation (I think that talks about "qrc") and if I
> interpret that documentation correctly then yes, code using that function
> will find icons from the rcc/qrc "builtin" resource over those in xdg
> themes (if the XDG icon repository is even in the icon theme search path).
>
>
​Yes, I'll try that in the same way as Kate on win/mac. And share the
results, for sure.
​


> >>> What I don't know
> ​​
> ​​
> however is whether artists consider that these icons
> >>> should be themeable...
> ​​
>
>
> I think icon artists will consider that you should touch their icons (for
> theming or anything else). They will probably also consider that their
> icons are the "best" but they really should also consider it a right for
> anyone to use other icons ;)
>
>
(that
​>>> ​
was a comment
​David :​
)
​ but I agree​


​In short either all icons used by a given app are supported by selected
theme, or theming is a waste of effort. After years I generally think
theming is very special statistically a low-priority task. In most cases
for Linux software if there's no single default worldwide for given app;
distros change that to naturally differentiate themselves. Only web apps
are immune to that because the environment they run in is consistent.
Then when even you, the author, do not know how your app looks on the
user's desktop, even things such as documentation is hard to prepare (if it
exists at all!) since it refers to one (usually even older) icon theme.
My favourite support request from 2016 is so far: how to find an "about
app" action, because on non-Plasma desktop the help icon was completely
different.

-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20160218/79af39f3/attachment.htm>


More information about the calligra-devel mailing list