IDEA-172166 [linux] editor font size in Settings may decrease after restart

This commit is contained in:
Anton Tarasov
2017-04-28 23:46:50 +03:00
parent 38f7d00466
commit 79d4bec716
@@ -378,7 +378,7 @@ class UISettings : BaseState(), PersistentStateComponent<UISettings> {
if (UIUtil.isJreHiDPIEnabled() && !SystemInfo.isMac) size = UIUtil.DEF_SYSTEM_FONT_SIZE.toInt()
}
else {
size = ((readSize.toFloat() / readScale) * normalizingScale).toInt()
if (readScale != normalizingScale) size = Math.round((readSize / readScale) * normalizingScale)
}
LOG.info("Loaded: fontSize=$readSize, fontScale=$readScale; restored: fontSize=$size, fontScale=$normalizingScale")
return size