Icon Theme Support
jonathan.giles at oracle.com
Sat Oct 20 19:36:59 PDT 2012
I'm interested to hear if this is common practice. In one of my past
lives as a Swing client application developer I would always cherry pick
the icons I wanted to use out of the icon packs I had available to me,
rather than try to ship an entire icon pack (or multiple icon packs).
From my experience icon packs tend to be rather large (when taking into
account they normally ship with some permutation of 16x16, 24x24, 32x32,
48x48, 64x64 pixel .png, .svg and .ico files).
So, in short, is shipping an entire, or multiple, icon packs something
that people actually want to do, and if so, would some kind of library
support for this be beneficial?
As a secondary question / comment: this seems like something that a
third party library could offer - rather than being necessarily included
in JavaFX itself?
On 21/10/2012 5:58 a.m., Mark Fortner wrote:
> I was wondering if anyone had given any thought to supporting Icon Themes
> in JavaFX? When you look at Swing apps (and now JavaFX apps) you find a
> lot of the same icons borrowed from various Linux icon themes. Invariably
> someone has taken apart the theme's archive, and extracted the icons that
> they wanted and simply added them as resources to their project. However,
> that misses some of advantages of having a theme in the first place --
> namely that if you use the standard naming conventions for icons, then you
> should be able to do drop-in replacements of the icons without having to
> change your code. This makes is possible to freshen up the look of your
> app, or to use icon themes that fit a specific OS. After all, do you
> really want Tango icons on your nice clean OS X app? Moreover, it would
> make it possible for user's to customize the look of their apps without
> developer involvement.
> Which brings me rather circuitously back to my point -- is there a way to
> support icon themes in CSS? For example, I'd like to simply drop *
> AwOken.tar.gz* into my classpath, and have an icon reference like this
> resolve properly: *-fx-image: url('clear/24x24/apps/ubuntuone-client.png');*
> Ideally, this should happen without having to repackage the icon themes
> into a JAR since themes are often stored in a variety of formats tar.gz,
> rar, zip, etc.
More information about the openjfx-dev