IDEA-185405 Nested Idea does not scale on kubuntu 17.10 / KDE Plasma 5

A regression of IDEA-184383, when running with JB JDK of previous versions.
It doesn't affect bundled JB JDK.
This commit is contained in:
Anton Tarasov
2018-02-12 17:21:24 +03:00
parent d2d15a2eaf
commit 2579aaf87b
@@ -2992,7 +2992,7 @@ public class UIUtil {
}
else if (SystemInfo.isLinux) {
Object value = Toolkit.getDefaultToolkit().getDesktopProperty("gnome.Xft/DPI");
if (value instanceof Integer) {
if (value instanceof Integer) { // defined by JB JDK when the resource is available in the system
// If the property is defined, then:
// 1) it provides correct system scale
// 2) the label font size is scaled
@@ -3001,8 +3001,8 @@ public class UIUtil {
float scale = JBUI.discreteScale(dpi / 96f);
DEF_SYSTEM_FONT_SIZE = font.getSize() / scale; // derive actual system base font size
}
else {
forcedScale = Float.valueOf(getScreenScale());
else if (!SystemInfo.isJetBrainsJvm){
forcedScale = Float.valueOf(getScreenScale()); // With Oracle JDK: derive scale from X server DPI
}
}
else if (SystemInfo.isWindows) {