Create account / Log in

Swing Look And Feel

Suggestions for additional features for the module editor and Vassal engine.

Moderators: uckelman, Tim M

Swing Look And Feel

Postby fcolmenarez » July 4th, 2020, 2:24 pm

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.
User avatar
fcolmenarez
 
Posts: 20
Joined: June 28th, 2012, 3:59 pm

Re: Swing Look And Feel

Postby uckelman » July 4th, 2020, 2:31 pm

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.
User avatar
uckelman
Site Admin
 
Posts: 8989
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Swing Look And Feel

Postby Flint1b » July 4th, 2020, 2:45 pm

User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Swing Look And Feel

Postby uckelman » July 4th, 2020, 6:33 pm

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.
User avatar
uckelman
Site Admin
 
Posts: 8989
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Swing Look And Feel

Postby fcolmenarez » July 4th, 2020, 7:10 pm

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.
User avatar
fcolmenarez
 
Posts: 20
Joined: June 28th, 2012, 3:59 pm

Re: Swing Look And Feel

Postby Flint1b » July 4th, 2020, 8:05 pm

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: https://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.
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Swing Look And Feel

Postby uckelman » July 4th, 2020, 10:02 pm

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.
User avatar
uckelman
Site Admin
 
Posts: 8989
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Swing Look And Feel

Postby Cattlesquat » July 4th, 2020, 10:26 pm

Well there's this thread: viewtopic.php?f=5&t=4533

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:
viewtopic.php?f=5&t=4580

Can the "old" bug be found?

Oh, yes it can: http://www.vassalengine.org/tracker/sho ... gi?id=4050
User avatar
Cattlesquat
 
Posts: 947
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Swing Look And Feel

Postby uckelman » July 4th, 2020, 11:05 pm

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: http://www.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.
User avatar
uckelman
Site Admin
 
Posts: 8989
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Swing Look And Feel

Postby uckelman » July 5th, 2020, 12:11 am

Thus spake Joel Uckelman:
> I'll make a PR and a test build using the Windows LAF so we can check.

The PR:

https://github.com/vassalengine/vassal/pull/64

A test build:

http://www.vassalengine.org/~uckelman/t ... indows.exe

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8989
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Swing Look And Feel

Postby fcolmenarez » July 5th, 2020, 4:31 am

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)
User avatar
fcolmenarez
 
Posts: 20
Joined: June 28th, 2012, 3:59 pm

Re: Swing Look And Feel

Postby Cattlesquat » July 5th, 2020, 3:41 pm

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" :D

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
User avatar
Cattlesquat
 
Posts: 947
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Swing Look And Feel

Postby Cattlesquat » July 5th, 2020, 3:57 pm

Here is a screenshot illustrating some of my complaints:

WindowsLAF.png
WindowsLAF.png (121.88 KiB) Viewed 3247 times


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
User avatar
Cattlesquat
 
Posts: 947
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Swing Look And Feel

Postby uckelman » July 5th, 2020, 10:25 pm

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.
User avatar
uckelman
Site Admin
 
Posts: 8989
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Swing Look And Feel

Postby Cattlesquat » July 5th, 2020, 10:58 pm

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 :-)

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.
User avatar
Cattlesquat
 
Posts: 947
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Next

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 3 guests

cron