Discussion and Support

Skip to content

It is currently Thu Apr 27, 2017 2:17 am 

Forum rules

Posting now open to all registered forum users.

Reply to topic  [ 4 posts ] 

Previous topic | Next topic 

  Print view

Author Message
Joined: Mon Dec 05, 2016 1:50 am
Posts: 7
 Post subject: MapTool 1.4, Swing, and High-DPI Support
PostPosted: Mon Dec 05, 2016 5:29 am 
Okay, so I checked this sub-forum before posting this, and did not find any threads regarding it.

I have very poor vision, and my current setup uses Windows 7's High DPI settings at 200% DPI on a 34" 3440x1440 21:9 ultrawide monitor in inverted color mode (e.g. white is black, black is white, et cetera).

Problem is, Swing (javax.swing.*) does not support high DPI screen settings at all, but JavaFX does. (I know this as I recently converted one of my own Java apps from utilizing Swing as its GUI windowing engine to utilizing JavaFX as its GUI engine so I could actually use it.)

After grabbing the latest revision of MapTool 1.4.x's SVN repo and cd'ing to trunk/maptool/src/main/java/net/rptools/maptool/client and running cat *.java | grep import| grep swing to search the client Java code for Swing imports, I get a bunch of results, which on a casual glance tells me the reason why MapTool 1.4.x (and likely priooor MapTool versions as well) do not properly support high DPI settings -- even when set at the OS level -- is due to it using Swing.

Right now, my workaround is to zoom in to 150%, start the server, and then zoom out, but this is a pain and I don't want to have to spend 30 seconds just to click a menu item.

Right now on my Windows 10 box I'm in the middle of building MapTool from source to verify all this (granted line 5 of build.gradle causes gradlew.bat to throw an error under JDK 1.8.0_112). However, I did download MapTool 1.4.0.,5 from the public downloads link from RPTools.net, and I still get the same symptoms when running the JAR file.

So, the questions aare:

1) Is there a Look and Feel theme somewhere on the forums here that can address these problems (which include all GUI elements except the chat box which can have its font size increased in Preferences>Accessibility)?

2) If not, is there anything stopping us from re-implementing MapTool's GUI using JavaFX so that it can support high DPI settings properly? (Note: I'm happy to assist in this effort myself, as I've done such a conversion myself before, but on a much smaller scale.)

If I am missing something, please do let me know, as if there's a way to fix this without rewriting the entire GUI, I'd prefer to take that route at this juncture. However, if re-wreiting MapTool's GUI is the only way to fix this, then so be it.

(Side note: after checking out the repo, the only way I was able to build the source was to remove line 5 of trunk/build.gradle. Not sure why as I was using the gradlew.bat wrapper provided in the repo, but this is really only an "issue" if I need to help contribute code changes to MapTool 1.4.x so that it can support high DPI settings properly.)

User avatar  Offline
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9191
Location: Netherlands
 Post subject: Re: MapTool 1.4, Swing, and High-DPI Support
PostPosted: Mon Dec 05, 2016 9:27 am 
search this forum for 'manifest'. the next release will have this implemented.


My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II and onMouseOverEvent
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS

Joined: Mon Dec 05, 2016 1:50 am
Posts: 7
 Post subject: Re: MapTool 1.4, Swing, and High-DPI Support
PostPosted: Mon Dec 05, 2016 1:50 pm 
wolph42 wrote:
search this forum for 'manifest'. the next release will have this implemented.

I'll do that. Do we have an ETA on when said release will go public and are we talking about the 1.4.0.x branch or the 1.4.1.x branch? I only ask so as to know what version to look for (and to get my group to move to from 1.3.b91...).


User avatar  Offline
Great Wyrm
Joined: Mon May 10, 2010 11:59 am
Posts: 1558
Location: Chicagoland
 Post subject: Re: MapTool 1.4, Swing, and High-DPI Support
PostPosted: Mon Dec 05, 2016 4:39 pm 

You don't have to wait for any MapTool release to implement this. You just need to place the manifest files where your java.exe is and run the regedit (although I suspect you may already have the setting placed in your registry). I've tested this on my Surface Pro and it works great!

In 1.4.1.x we will have an option set in the Launcher to set your registry for you and the manifest will come with the built in JRE. Right now it's in my test build @ maptool.nerps.net if you have issues doing it manually.

Custom MapTool 1.4.x.x Fork: maptool.nerps.net
More information here: MapTool Nerps! Fork | TokenTool Nerps! Fork
Custom TokenTool (version 1.0b33): TokenTool.exe

Display posts from previous:  Sort by  
Reply to topic  [ 4 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 2 guests


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman