Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
11.1
-
Windows with HiDPI screens
Description
Provide workarounds to three JDK bugs that caused the Windows LAF to be unusable on many HiDPI configurations, typically when an external monitor (or projector) is involved, or is disconnected or connected.
- In certain configurations, the GUI font size would be either way too large or way too small. (I can't remember exactly which configurations caused this, but going through the manual test case list below will trigger it several times.)
- In multi-monitor configurations that involve one HiDPI screen and one regular screen, the size of controls drawn by the OS, such as checkboxes and outline expansion handles, will be incorrect unless the HiDPI screen was the main display at login. I earlier reported this as a JDK bug at https://bugs.openjdk.java.net/browse/JDK-8211715 . (Note that there are a few icons which cannot be fixed using the UIDefaults approach taken here, e.g. checkmarks in JCheckBoxMenuItem.) In some cases, the LAF would previously end up scaling the control images received from the OS using a poor image scaling interpolation; the supplied patch improves the scaling quality in these cases.
- On non-integral scaling levels, e.g. 150%, borders around text components will be of uneven thickness due to rounding error. This patch fixes that. This also happens to JComboBox, but in that case cannot be fixed with a simple patch, since that one does not take its border from UIDefaults.
I will provide a PR with workarounds.
Below is a manual test plan that I used to test these patches, on Windows 10. A laptop and one external monitor was used for these tests. After each line in the test plan, the patch is confirmed to work. In most of these cases there is some kind of improvement in behavior from the patch--either a corrected control/font size or at least an improvement in control icon scaling interpolation quality.
- main display laptop at Windows login (laptop 200%/external 100%)
- change main display to external monitor while running app
- restart app
- change 100% to 150% while running app
- restart app
- log out and in again (of Windows--this makes a difference!)
- change 150% to 100% while running app
- restart app
- main display external monitor at login (laptop 200%/external 100%)
- change main display to laptop while running app
- restart app
- change 100% to 150% while running app
- restart app
- log out and in again
- change 150% to 100% while running app
- restart app
- change 200% to 150% while running app
- restart app
- main display laptop at login (laptop 200%/external 100%), then disconnect external before running app
- reconnect external while running app
- restart app
- log out, disconnect external, log in
- reconnect external while running app
- restart app
- disconnect external while running app
- main display external monitor at login (laptop 200%/external 100%), then disconnect external while running app
- reconnect external while running app
- restart app
- log out, disconnect external, log in
- reconnect external while running app
- restart app
- main display laptop at login (laptop 200%/external 150%), then disconnect external before running
- reconnect external while running app
- log out, disconnect external, log in
- reconnect external while running app
- restart app
- main display external monitor at login (laptop 200%/external 150%), then disconnect external before running
- reconnect external while running app
- restart app
- log out, disconnect external, log in
- reconnect external while running app
- restart app
- main display external at login (laptop 150%, external 100%)
- change 100% to 150% while running app
- restart app
- change main display to laptop (200%), set external display to 100%, log out, disconnect external, log in, run app
- reconnect external while running app (will be 100%)
- close laptop lid (will switch to external display)
Attachments
Attachments
Issue Links
- incorporates
-
NETBEANS-3699 Netbeans not properly working in multiple HiDpi screens
- Closed
-
NETBEANS-338 Find/Replace dialog does not render correctly
- Closed
- links to
- mentioned in
-
Page Loading...