Swing Look And Feel

Thus spake fcolmenarez:

Maybe something in Preferences to switch between the available look and
feel for Swing. My experience in HiDPI Windows 10 is that the Java
Native LAF sucks balls (wrong window sizing, right-click menus sometime
pop someplace else, low res icons). The WindowsLookAndFeel functionally
works much better in HiDPI and does better sizing.

I thought we were using the WindowsLookAndFeel on Windows by default.
You’re saying that we aren’t?


J.

Not on Windows: github.com/vassalengine/vassal/ … p.java#L84

Thus spake Flint1b:

Not on Windows:

Ah, I see. I think what I’m remembering is that we tried using the Windows
LAF and got so many complaints at the time about it being awful that we
changed it back. Perhaps it’s better now that it was?


J.

It was better for me. But some caveats:

VASSAL pre 3.3.0 Hi DPI and the regular look and feel was impossible to use/edit with 2K/4K screens as the UI interface was TINY. Windows Look And Feel sized the menu toolbars correctly and the interface UI somewhat better and with a large monitor was much nicer to use and the toolbar buttons were more compact without the odd borders (call me nuts but the frames make the map toolbar buttons misalign with the module level toolbar buttons).

Ultimately I would just like to have the choice. You can keep regular look and feel as a default.

If you know a bit about Java, you can always create your own sh/bat file that starts the JVM with a custom parameter which selects the LAF: docs.oracle.com/javase/tutorial … ommandLine

All these system installations are not really needed, you can just do a “java -jar Vengine.jar” and append whatever else parameters you want, like this LAF parameter.

The commit where we stopped using the Windows LAF is f1669b94, from 13 February 2012. My commit message was:

“Don’t use native LookAndFeel on Windows, as it causes too many problems there. Argh.”

That code was added in cab5e2d1, from 30 July 2011. That’s when 3.1.16 to 3.1.18 were current, but my guess is that cab5e2d1 wasn’t in a release and was instead on the 3.2 development branch, so would have showed up in test builds but not in any release.

There ought to be discussion about this in the forum around that time. If someone would like to track that down, it would be helpful to know what problems we were seeing then. Once we know what problems we’re looking for, I’ll make a test build using the Windows LAF for comparison.

Well there’s this thread: https://forum.vassalengine.org/t/comparing-looks-between-3-1-16-and-3-2/4346/1

Which unfortunately has the images missing now, but you can get a feel for some of the descriptions of stuff that was going on.

And then there are somewhat more ominous overtones in the brief discussion here:
https://forum.vassalengine.org/t/3-2-roundup/4393/1

Can the “old” bug be found?

Oh, yes it can: vassalengine.org/tracker/sho … gi?id=4050

Thus spake Cattlesquat:

[This message has been edited.]

Well there’s this thread: viewtopic.php?f=5&t=4533[1]

Which unfortunately has the images missing now, but you can get a feel
for some of the descriptions of what was going on.

Oh, that’s funny—I even noted at the time that the images were gone.

And then there are somewhat more ominous overtones in the brief
discussion here:
viewtopic.php?f=5&t=4580[2]

Hmm. This thread is not terribly enlightening from the present remove.
(Incidentally, my daughter was born while this particular thread was
underway. That’s why Pieter is congratulating me on the last page.)

Can the “old” bug be found?

Oh, yes it can: vassalengine.org/tracker/sho
gi?id=4050[3]

I wasn’t sure if there’d be an issue for this in the tracker, as the
change was made and removed betwen releases.

The bug has some good stuff in it.

Thanks for chasing those down. None of this is anything we can fix by
reasoning about it; we need to have a look at how it behaves, which
may well be far different on Java 14 than it was on Java 6, or it might
still be broken, which would also not surprise me.

I’ll make a PR and a test build using the Windows LAF so we can check.


J.

Thus spake Joel Uckelman:

I’ll make a PR and a test build using the Windows LAF so we can check.

The PR:

github.com/vassalengine/vassal/pull/64

A test build:

vassalengine.org/~uckelman/t … indows.exe


J.

I downloaded it. I like the Windows Look and Feel much more than the regular one. The Editor is more compact and fits more rows of data. The Game Window toolbar button are aligned and uniform with no frames, the regular one is ugly with the various button frames and the map tool bar doesn’t align with the module toolbar.

I did try various tricks to run the jar with the Windows Look And Feel but I’m not quite sure what’s preventing 3.3.1 from using it properly. I had to download the 3.3.0-beta source code and comment out the check for the Windows OS so it would grab the system look and feel properly. For whatever reason 3.3.1 isn’t paying attention to that property correctly.

FWIW I’m unable to reproduce bug 4050 described in the old topic under WLAF in the build I downloaded (3.3.1-220)

I gave PR#64 a try on Windows.

It was actually pretty jarring – for instance I found the toolbar buttons “don’t look like buttons” any more. I personally don’t really like the new font as much either (smaller, so harder to read), but that’s less of a thing. There are also weird substantial open gaps on the left sides of all my popup menus, as if they were supposed to be placeholders for icons to be there (but modules can’t put icons on popup menus at present).

I think the biggest thing that would happen (to me) if we just switched over would be me getting a bunch of emails from module users asking me what I changed and “could I put it back please” :smiley:

And probably I could in effect “put it back”, but just with a whole bunch of extra work to get back to where things stood. And/or to the extent that my various visuals were designed to work well in the old look-and-feel, they’d have to be redesigned to look good in default.

Overall I think changing this now would be a jarring change to a bunch of people who’ve gotten used to something working/looking a particular way. (And in my case as a module designer it would “make me look bad” to the players).

So I’m completely fine with making it a preference – it looks like the kind of thing that’s actually easy to “Preference”? But I’m against swapping in Windows LAF as the only choice at this late date.

Brian

Here is a screenshot illustrating some of my complaints:

[attachment=0]WindowsLAF.png[/attachment]

Notice in particular (on the far far right) that the “Move Trails” button (which uses both a “Button Text” and a “Button Image” in the normal Vassal way of configuring things) now basically looks like two different buttons, or at least is no longer clearly distinguishable as being a button.

(My two toolbars are from two different versions of the module – I opened an older version in 3-2-17 to take screenshots of the old look, rather than having to revert my directory)

Also look at the weird ginormo-popups. This happens to all the popups on the main menu too (the weird spaces and stuff). Makes the lack of icons there reeeally stand out.

Brian

Thus spake Cattlesquat:

I gave PR#64 a try on Windows.

It was actually pretty jarring – for instance I found the toolbar
buttons “don’t look like buttons” any more. I personally don’t really
like the new font as much either (smaller, so harder to read), but
that’s less of a thing.

Could I get some screenshots comparing the two?


J.

I think I gave you some in the message just above yours? Or do you want some even bigger ones? Or more specific varieties?

Just let me know. I’m confused because I thought I’d just put some :slight_smile:

If you scroll around in the one above, it has labeled which one is Windows LAF and which one is the other. The “Top Bar” is the Windows LAF one and the second bar is what I now think of as “normal Vassal”. The lefthand “popup menu” is the Windows LAF. The right hand one is “normal Vassal”.

Happy to make more if needed.

I replied before I got to the end of the messages. Hmm. Will have to think about this. I’m not a fan of adding preferences; I’d been hoping the Windows LaF would be obviously better so we could just switch to it…

Meanwhile I’m in favor of referring to it in the future as Windows UAF. You know, for “Ugly AF” :smiley:

I’ll play the role of the heretic troublemaker and throw in a third option - we could roll our own “Vassal LAF” :smiley:

By “we” I mean someone, not me, I’m a backend dev at heart, I mean I could help prepare the code structures for this but if I get to design the actual pixels on the screen Vassal will probably lose 95% of the users, they will never come anywhere close to a computer screen again, some might end up in a hospital with a heart attack…

Meanwhile I find the regular LAF “Ugly as Fuck” it’s a preference thing. Here is something that bugs me:

[attachment=0]JLAF-1.png[/attachment]
The spacing and the misalignment is utterly jarring between the map toolbar buttons and the module toolbars.

This does not happen in WLAF I have a nice ordered row of icons that serve as buttons. There are no frames BUT I don’t put text next to icons.

[attachment=1]WLAF-1.png[/attachment]
When it comes to modern UI design toolbar buttons are usually purely icons, almost never text. Also all icons are usually the same size to guarantee uniformity across the toolbar. You use tool-tips to explain functions. Text just gobbles up real estate you can use for other useful functions.

[attachment=2]Affinity-Designer-Toolbar.png[/attachment]
Funny enough what Cattlesquat finds terrible for the right-click menus I find it an improvement (if we ever support icons now there’s a place for them), the spacing is wider and more readable and uniform (in SLAF the popup menu size depends entirely on the amount of text making for distorted popups everywhere). In the windows example, all that’s missing is to right-justify the keyboard shortcuts so they all align.

I still haven’t figured out why I can’t make 3.3.1 run under System Look and Feel with the swing.properties file OR the command line -D options. I don’t recommend using WLAF as the default because folks are very much used to a 20 year old design. I’m probably a heathen demon spawn. I’ll eventually find a way to put WLAF back on with a property or something,

But it would be nice to simply have it as a preference.

Oh yeah I’m violently in agreement with Francisco that it would be best to just have preference. Far be it from me to keep the author of the awesome Empire of the Sun module from having his icons the way he likes them! I just don’t want to choke on all the hate email from PoG guys :slight_smile:

I would not wish hate mail on anyone. For now I’m running vassal with a batch file using a Java 14 JDK distribution. One day maybe I’ll write my own toolbar. Thanks for the kind words on the module. I’m finding more stuff to improve. For the next revision I’m adding the card zoomer from Twilight Struggle.