Update user scale factor after font defaults are patched

To let JBUI.USER_SCALE_FACTOR_PROPERTY listeners to have UIUtil.getLabelFont() (and the stuff like that) return properly scaled font.
This commit is contained in:
Anton Tarasov
2017-03-22 19:32:03 +03:00
parent 60942f6c6d
commit d9c9fa312e
@@ -746,8 +746,8 @@ public final class LafManagerImpl extends LafManager implements ApplicationCompo
UISettings uiSettings = UISettings.getInstance();
if (uiSettings.getOverrideLafFonts()) {
storeOriginalFontDefaults(uiDefaults);
JBUI.setUserScaleFactor(uiSettings.getFontSize() / UIUtil.DEF_SYSTEM_FONT_SIZE);
initFontDefaults(uiDefaults, uiSettings.getFontSize(), new FontUIResource(uiSettings.getFontFace(), Font.PLAIN, uiSettings.getFontSize()));
JBUI.setUserScaleFactor(uiSettings.getFontSize() / UIUtil.DEF_SYSTEM_FONT_SIZE);
}
else {
restoreOriginalFontDefaults(uiDefaults);