diff --git a/core/src/main/java/com/github/weisj/darklaf/theme/PropertyFontMapper.java b/core/src/main/java/com/github/weisj/darklaf/theme/PropertyFontMapper.java index dcb6a18e..fd78c4f9 100644 --- a/core/src/main/java/com/github/weisj/darklaf/theme/PropertyFontMapper.java +++ b/core/src/main/java/com/github/weisj/darklaf/theme/PropertyFontMapper.java @@ -46,7 +46,7 @@ public class PropertyFontMapper implements FontMapper { adjustment = getSize(defaults); // No need to create a new font. if (adjustment == 0) return font; - if (adjustment < font.getSize2D()) { + if (adjustment + font.getSize2D() <= 0) { if (adjustment != Integer.MIN_VALUE) { LOGGER.warning("Font " + font + " would be invisible after applying " + "an adjustment of " + adjustment + ". Aborting!"); diff --git a/core/src/test/java/ui/ComponentDemo.java b/core/src/test/java/ui/ComponentDemo.java index 1a82ef4e..5c57e28f 100644 --- a/core/src/test/java/ui/ComponentDemo.java +++ b/core/src/test/java/ui/ComponentDemo.java @@ -33,7 +33,9 @@ import java.awt.event.ActionEvent; public interface ComponentDemo { static Theme getTheme() { - return new IntelliJTheme(); + return LafManager.themeForPreferredStyle(new PreferredThemeStyle(ContrastRule.STANDARD, + StyleRule.LIGHT, + FontSizeRule.DEFAULT)); } JComponent createComponent(); diff --git a/core/src/test/java/ui/tabFrame/TabFrameDemo.java b/core/src/test/java/ui/tabFrame/TabFrameDemo.java index 99213a31..c8e6ef78 100644 --- a/core/src/test/java/ui/tabFrame/TabFrameDemo.java +++ b/core/src/test/java/ui/tabFrame/TabFrameDemo.java @@ -48,7 +48,7 @@ public class TabFrameDemo implements ComponentDemo { private static Component createTextArea() { NumberedTextComponent numberPane = new NumberedTextComponent(new NonWrappingTextPane() {{ setText(StringUtil.repeat(DemoResources.LOREM_IPSUM, 10)); - setFont(new Font(Font.MONOSPACED, Font.PLAIN, 14)); + setFont(new Font(Font.MONOSPACED, Font.PLAIN, getFont().getSize())); }}); NumberingPane numbering = numberPane.getNumberingPane(); Icon icon = IconLoader.get().getIcon("navigation/arrowRight.svg");