From 9d4ed9ac4012bb5322273bdc3c086255cc02bc4f Mon Sep 17 00:00:00 2001 From: Anton Tarasov Date: Fri, 16 Sep 2016 16:55:16 +0300 Subject: [PATCH] IDEA-156648 Tree view is compacted in 2016.2 EAP "prevScale" is used to normalize ui defaults values patched on the previous update cycle with the previous scale factor. On the first update cycle "prevScale" should be set to 1.0 as it corresponds to the scale of the ui defaults not yet patched. --- .../src/com/intellij/ide/ui/laf/LafManagerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.java b/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.java index 647ba2aefbdd..b9b8336eab58 100644 --- a/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.java @@ -531,7 +531,8 @@ public final class LafManagerImpl extends LafManager implements ApplicationCompo private static void patchHiDPI(UIDefaults defaults) { Object prevScaleVal = defaults.get("hidpi.scaleFactor"); - float prevScale = prevScaleVal != null ? (Float)prevScaleVal : JBUI.scale(1f); + // used to normalize previously patched values + float prevScale = prevScaleVal != null ? (Float)prevScaleVal : 1f; if (prevScale == JBUI.scale(1f) && prevScaleVal != null) return;