GPIW piece images on Apple

Do the piece images for a Game Piece Inventory Window not draw correctly on an Apple or is it a Java issue? I have one tester who cannot display any pieces properly on his GPIWs. He is the only one experiencing this issue and is using a MacBook while all other playtesters are running Windows. I found one other thread from 4 years ago mentioning this issue but it had neither a resolution nor any investigation into the culprit. Here is a screenshot of the truncated cards he is seeing. He is supposed to be seeing a full card image.

Just to add to the is it apple line of thought… I use a MacBook (latest MacOS). I was seeing his issue too, using Vassal 3.2.17. I assumed it was standard behaviour or cross-platform at least, until now. Not sure if it occurs in v3.3.1.

Thus spake m3tan:

Do the piece images for a Game Piece Inventory Window not draw correctly
on an Apple or is it a Java issue? I have one tester who cannot display
any pieces properly on his GPIWs. He is the only one experiencing this
issue and is using a MacBook while all other playtesters are running
Windows. I found one other thread from 4 years ago mentioning this issue
but it had neither a resolution nor any investigation into the culprit.
Here is a screenshot of the truncated cards he is seeing. He is supposed
to be seeing a full card image.

What module is this?


J.

The module I am creating for Sturm Europa. I’m also the designer ;-). Happy to share the file if you’re asking to troubleshoot.

Thus spake m3tan:

The module I am creating for Sturm Europa[1]. I’m also the designer ;-).
Happy to share the file if you’re asking to troubleshoot.

Yes, I’d like to see it.


J.

What’s the best method to send over?

I can PM a Dropbox link? Publisher does not want files publicly posted until after Kickstarter launches…

Thus spake m3tan:

What’s the best method to send over?

I can PM a Dropbox link? Publisher does not want files publicly posted
until after Kickstarter launches…

That’s fine, or email me a Dropbox link.


J.

This does not seem to be an Apple-specific problem. I just observed a similar issue on my Windows 10 laptop, which has a 4K display. Could this be a HiDPI issue? I’m running the 3.3.1 test build (VASSAL-3.3.1-test-35-g484afd49-windows.exe) that fixes the GKC behavior with decks. Is there a more recent build that still has that fix that I can try out?

Joel,

Any chance to look at this issue yet?

Thus spake m3tan:

Joel,

Any chance to look at this issue yet?

I haven’t forgotten about it. I still have the original message in my
inbox. As it’s a bug which also occurred in 3.2.17, it’s in line behind
bugs which are new in 3.3. I’ll get to it eventually, but it’s hard to
predict when.


J.

I went to look just now, but the Dropbox link is dead.

I have a guess about what’s wrong. I think the JTree in Inventory.java needs to have it’s row height set to 0 so that the row renderer is queried for the height of each row, and possibly also that the row renderer needs a preferred size set. These appear to change nothing on Linux, but might make a difference on a Mac.

Please try this build: vassalengine.org/~uckelman/t … macosx.dmg

It sets the row height to 0. If the problem persists with this build, I’ll make another one which additionally sets a preferred height for each row.

My playtester reports that the issue was fixed on his Mac, so that good news! However, as I mentioned up-thread, a similar though not identical problem occurs on one of my laptops, though not on my desktop nor other laptop. All 3 are running identical versions of Windows 10 Pro 64-bit and Java. I’ve verified the problem occurs on Vassal 3.2.17, 3.3.1, and multiple recent test builds. One notable difference is that the laptop with the issue has a 4K display. The resolution is set to 3840x2160.

See below screenshot:

This is a HiDPI problem, not a Mac-specific one. I can reproduce it when I set my UI scaling to 2. I’m working on fixing it now.

The problem was that I’d forgotten to scale the drawing location for the icons by the device scale factor (which looks normal on a display where that scale factor is 1).

Try one of the VASSAL-3.3.1-329-g1cc4cb2b-inventory_icon_fix builds, here:

vassalengine.org/~uckelman/tmp/