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.
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.
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?
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.
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.
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.
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: