Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirth UI doesn't display correctly on high dpi monitors #3969

Open
rbeckman-nextgen opened this issue May 11, 2020 · 11 comments
Open

Mirth UI doesn't display correctly on high dpi monitors #3969

rbeckman-nextgen opened this issue May 11, 2020 · 11 comments

Comments

@rbeckman-nextgen
Copy link
Collaborator

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

This may be a duplicate of issue 3349, but I'm not sure.
On high DPI screens, Mirth Administrator is too small to be readable.
I suspect this is a problem with the Swing GUI components, since they're not DPI-aware. In principle, windows will auto-scale any application that isn't DPI-aware, to ensure that the display doesn't suck. Unfortunately, Java itself seems to report that it is DPI-aware in it's .exe manifests, which means that windows will trust Java to handle all DPI-scaling. The end result is that things look ugly.
I don't know if there's anything that can be done in the application-level Java code to fix this display issue, but it would sure be nice if there was.

Imported Issue. Original Details:
Jira Issue Key: MIRTH-4091
Reporter: neils
Created: 2016-12-08T10:22:34.000-0800

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

As a work-around to this issue do the following:

  1. Track down the specific shortcut that's opening Mirth Administrator. On my Windows install, this is kept here:
    C:\Users\neils\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Mirth Connect

  2. Open the properties for that shortcut and identify the target command that's being run. On my windows install, this is:
    "C:\Program Files\Java\jre1.8.0_121\bin\javaws.exe" -localfile "C:\Users\neils\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\16\5208e50-1c7a9d80"

  3. Navigate to the indicated file in the AppData directory. For example, this path:
    C:\Users\neils\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\16\

  4. Identify the indicated file in this directory. This will be a JNLP file, which is an XML-formatted text file containing settings.
    C:\Users\neils\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\16\5208e50-1c7a9d80

  5. Open the identified JNLP file in Notepad or other text editor.

  6. Under the Resources element, add the following element:

  1. Save the file and exit.

Imported Comment. Original Details:
Author: neils
Created: 2017-03-09T12:54:23.000-0800

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

I've tried this workaround on 3.5.0 and it does not work, The reason is that the JNLP file is replaced when the Mirth Administrator is launched which wipes out the . I tried making the JNLP file read-only and I tried disconnecting from the internet, but that did not prevent it from being replaced.

Do you have any suggestions for preserving the workaround? Thanks!

Imported Comment. Original Details:
Author: geoff wass
Created: 2017-05-27T21:38:48.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

By the way, in 3.5.0 there is no shortcut created for the Mirth Administrator as there was for 3.4.2. I had to reinstall and watch what changed in C:\Users\neils\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\16\ to locate the JNLP file.

Imported Comment. Original Details:
Author: geoff wass
Created: 2017-05-27T21:42:03.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

What @geoff said is correct, in 3.5 this workaround no longer works, on high resolution displays ie 4K laptops it is essentially impossible to use the product, UNLESS you drop the desktop resolution substantially.

Imported Comment. Original Details:
Author: rdejournett
Created: 2017-06-03T04:05:28.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

Here's another approach that worked for me for Mirth 3.4 and a fresh installation of Java 8.131:

  1. Make sure Mirth Server is running and Java 8, build 131 is installed.

  2. Use a web browser to open localhost:8080 -- this will bring up the Mirth Admin Application page.

  3. Click on the "Launch Mirth Connect Administrator" -- This will download a JNLP file (called webstart.jnlp)

  4. Copy the JNLP file to your desktop. You should be able to double-click on this file to start the Mirth Administrator. I renamed this file to "Mirth Administrator.jnlp"

  5. This JNLP file is an XML document. Use a text editor to open the JNLP file. Under the Resources element, add the following element:

Imported Comment. Original Details:
Author: neils
Created: 2017-06-05T13:33:46.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

This approach does NOT work in Mirth 3.5. :-(
The initial login dialog box is properly resized by this approach, but you've entered your login credentials for Mirth administrator, Mirth seems to try to open a separate JNLP file, which is not high-dpi-aware.

Imported Comment. Original Details:
Author: neils
Created: 2017-06-05T13:55:49.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

Here's a solution that I've found works for Mirth 3.5 and Java 8.131:

  1. Go to the Java directory that contains the jp2launcher.exe file that's run when Mirth Administrator is started. On my computer, the directory is C:\Program Files\Java\jre1.8.0_131\bin
  2. Right-click on the jp2launcher.exe file and select "properties"
  3. In the Properties window, select the Compatibility tab.
  4. Check the "Override high DPI scaling behavior" check box
  5. Underneath the "Scaling Performed by:" text, there's a drop-down menu. Select "System" on this menu.
  6. Click "OK"
    This will tell Windows 10 that it should be the manager of the high-dpi scaling rather than relying on the application (Java Swing) to do the high dpi scaling.

Imported Comment. Original Details:
Author: neils
Created: 2017-06-06T10:02:39.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

Neils,

Thank you for your suggestion.

I tried to follow your instructions but it did not work. The problem may be that Properties on my computer does not show the exact thing as you describe. I tried to what was closest by checking "Disable display scaling on high DPI settings".

I do not yet have Windows 10 Creators Update, so that may account for the differences between our computers.

--
Geoff Wass

Imported Comment. Original Details:
Author: geoff wass
Created: 2017-06-07T20:02:13.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

Neils,

I sent my message too quickly. I meant to first ask if you had any further suggestions.

Imported Comment. Original Details:
Author: geoff wass
Created: 2017-06-07T20:04:08.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

I'm using Windows 10 Pro build 1703 (Creator's update). I think that upgrading your windows build or downgrading Mirth to 3.4 might be your best approaches (if possible). On a previous version of Windows 10, I couldn't use the "Disable display scaling on high DPI settings" checkbox to make Mirth readable. Sorry. :-(
If you're feeling brave, there are some hacks you can apply to the manifest of the *.exe files in your C:\Program Files\Java\jre1.8.0_131\bin directory. You might try using Resource Tuner to manipulate the manifest of the java executables to mark them as high-dpi-UNAWARE. The details of this hack (which I make no guarantees about) can be found here:
https://superuser.com/questions/988379/how-do-i-run-java-apps-upscaled-on-a-high-dpi-display

I wish you the best of luck. If you find a successful workaround, please post it.

Imported Comment. Original Details:
Author: neils
Created: 2017-06-07T20:32:24.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

I verified that the solution I outlined on June 6th, 2017 works with Mirth version 3.5.1 running over Java 8 v151 on Windows 10 build 1709.
Unfortunately, the Java installer will create a new j2plauncher.exe file every time Java is upgraded. This means that the solution will need to be re-enabled after every Java update.

Imported Comment. Original Details:
Author: neils
Created: 2017-12-18T08:40:56.000-0800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.