native LaF, uniform button heights, different tile display

I took a break from squashing bugs last night to experiment with three
aesthetic things which have been irritating me for a long time:

  1. The default Java Look and Feel is…, well, let’s just say that it makes
    VASSAL look funny, and that causes the other apps to make fun of VASSAL. We
    already use the native LaF on MacOS. I’ve been using the native GTK LaF on
    Linux for several months now, and I can report that with Java 1.6.0 and
    before, it looks shoddy—but with OpenJDK it looks great. I haven’t recently
    checked on what it looks like using the native Windows LaF on Windows, but
    if it looks decent, I think we should.

  2. It’s bothered me almost from the time I started working on VASSAL that
    buttons in the tool bar can be all different heights. I implemented a
    simple (possibly too simple) hack which equalizes button heights. I think
    this looks a lot better than before. I’m doing this by providing a custom
    implementation of JToolBar.addImpl() which sets all children to have the
    same preferred height. (It would almost certainly be better to do this
    with a layout…)

  3. The throbber animation doesn’t work as well for indicating tile loading
    as I thought it would, since it’s contending for processor time with the
    tile loading itself. I tried a different tack last night, which I think
    is better.

These three things you can find in the build svn4039.

In the longer term, I would like to regularize the sizes of the icons used in the toolbars to the standard Tango sizes - 16, 22, 32 and 48. Not only should the buttons be the same height, but the actual icons should be the same height as well. A user preference would then allow you to select between the 4 sizes.

I’ve already done some work in this regard using OpIcon and ScaleOp to generate any required icons that do not exist in the module or Vengine.jar. Also a system for loading and naming sets of toolbar icons.

Saving this up for 3.2 or 3.3

BTW Joel, did you get my note that it does not appear possible to load SVG images from VEngine.jar?

Brent.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

The catch is obviously knowing what version of JDK is being used. Why not just include a menu option?

  • M.

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

There might be a desktop environment setting we can read to determine that
automatically, on some systems.

We should try to following the Tango naming guidelines, if we can.

Yes, but I haven’t looked into it yet.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Agreed (I need to rename the icons I have already used for the MM back to what they where). However, Tango only has a naming guideline for the icon ‘family’, not for the individual sized icon files. e.g. if we have a go-up icon, it comes in 4 sizes. I suggest

go-up-xsmall.png
go-up-small.png
go-up-medium.png
go-up-large.png

as opposed to

go-up-16.png
go-up-22.png
go-up-32.png
go-up-48.png

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

There is a standard naming convention: You have the following directories:
16x16, 22x22, 32x32, and scalable. Icons which depict the same thing at
different sizes have the same name, but different paths.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Different sizes go in different directories as far as I know.

  • M.

2008/8/13 Brent Easton <b.easton@exemail.com.au (b.easton@exemail.com.au)>

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

We can get that from a system property, ‘java.version’ or somesuch. I’m
not sure that this is something that the user should have a choice about
at the application level. At the desktop environment level, the native
LaFs pick up the desktop environment theme, so we’re covere there.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Gotcha, thanks.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

All the toolbars in VASSAL use VASSAL.tools.WrapLayout as their layout class, so you can modify that.

rk

Post generated using Mail2Forum (mail2forum.com)