IDEA-170099 [followup] let Swing text components dynamically scale HTML text on user scale factor change

This commit is contained in:
Anton Tarasov
2017-04-10 14:41:54 +03:00
parent 40ee28ddae
commit 343642204e
@@ -2528,7 +2528,7 @@ public class UIUtil {
public JBHtmlEditorKit(boolean noGapsBetweenParagraphs) {
style.addStyleSheet(isUnderDarcula() ? (StyleSheet)UIManager.getDefaults().get("StyledEditorKit.JBDefaultStyle") : DEFAULT_HTML_KIT_CSS);
style.addRule("code { font-size: 90%; }"); // small by Swing's default, make it b/w small and medium
style.addRule("code { font-size: 100%; }"); // small by Swing's default
style.addRule("small { font-size: small; }"); // x-small by Swing's default
if (noGapsBetweenParagraphs) style.addRule("p { margin-top: 0; }");
}