From b5da5cdb2de6ca7a44f28e88bd5495dee16c325b Mon Sep 17 00:00:00 2001 From: weisj <31143295+weisJ@users.noreply.github.com> Date: Thu, 27 May 2021 14:26:14 +0200 Subject: [PATCH] Check if text antialiasing hint isn't null. --- .../main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/property-loader/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java b/property-loader/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java index c45b8628..5a62cd5e 100644 --- a/property-loader/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java +++ b/property-loader/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java @@ -199,8 +199,8 @@ public class DarkSVGIcon implements DerivableIcon, RotateIcon, Seri RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g.setRenderingHint( RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE); - g.setRenderingHint( - RenderingHints.KEY_TEXT_ANTIALIASING, UIManager.get(RenderingHints.KEY_TEXT_ANTIALIASING)); + Object aaHint = UIManager.get(RenderingHints.KEY_TEXT_ANTIALIASING); + if (aaHint != null) g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, aaHint); icon.paintIcon(null, g, 0, 0); g.dispose(); return bi;