JBR-1669 IDE-managed HiDPI mode is broken

(cherry picked from commit 461b0b5cd4)
(cherry picked from commit 3049d42f8c)
This commit is contained in:
Anton Tarasov
2019-07-18 17:01:18 +03:00
committed by jbrbot
parent d4980d6d60
commit 05edc0b461

View File

@@ -58,7 +58,7 @@ import java.util.HashMap;
import java.util.Objects;
import sun.awt.AppContext;
import sun.awt.AWTAccessor;
import java.awt.GraphicsEnvironment;
/**
* {@code UIManager} manages the current look and feel, the set of
@@ -379,6 +379,11 @@ public class UIManager implements Serializable
if (osType == OSInfo.OSType.WINDOWS) {
iLAFs.add(new LookAndFeelInfo("Windows",
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel"));
if (!GraphicsEnvironment.isHeadless()) {
// Force DPI settings in Win32GraphicsEnvironment.initDisplayWrapper()
// prior to font size settings in desktop properties.
GraphicsEnvironment.getLocalGraphicsEnvironment();
}
if (Toolkit.getDefaultToolkit().getDesktopProperty(
"win.xpstyle.themeActive") != null) {
iLAFs.add(new LookAndFeelInfo("Windows Classic",