mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-08 01:21:42 +01:00
JBR-1669 IDE-managed HiDPI mode is broken
(cherry picked from commit461b0b5cd4) (cherry picked from commit3049d42f8c)
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user