Icon Theme Support
Mark Fortner
phidias51 at gmail.com
Sat Oct 20 09:58:25 PDT 2012
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.
Cheers,
Mark
More information about the openjfx-dev
mailing list