From 2579aaf87bbdfec6daeb16db05fa7c9b03226525 Mon Sep 17 00:00:00 2001 From: Anton Tarasov Date: Mon, 12 Feb 2018 17:06:38 +0300 Subject: [PATCH] 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. --- platform/util/src/com/intellij/util/ui/UIUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/util/src/com/intellij/util/ui/UIUtil.java b/platform/util/src/com/intellij/util/ui/UIUtil.java index 13f7ac86ab09..1bac56d783bc 100644 --- a/platform/util/src/com/intellij/util/ui/UIUtil.java +++ b/platform/util/src/com/intellij/util/ui/UIUtil.java @@ -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) {