diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextListener.java b/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextListener.java index f0829f60..519af0e0 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextListener.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextListener.java @@ -89,7 +89,7 @@ public class DarkTextListener implements FocusListener, PropertyChangeListener { } else if ("border".equals(key)) { ui.installBorder(); } else if (PropertyKey.ENABLED.equals(key) || PropertyKey.EDITABLE.equals(key)) { - PropertyUtil.installBackground(editor, ui.getBackground(editor)); + ui.updateBackground(editor); } } } diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextUI.java index 46aafd7e..c6b91531 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextUI.java @@ -117,6 +117,7 @@ public abstract class DarkTextUI extends BasicTextUI implements OpacityBufferedU updateMargins(); installBorder(); installPopupMenu(); + updateBackground(editor); } @@ -203,6 +204,10 @@ public abstract class DarkTextUI extends BasicTextUI implements OpacityBufferedU visualPaddingListener = null; } + protected void updateBackground(final JTextComponent c) { + PropertyUtil.installBackground(c, getBackground(c)); + } + protected Color getBackground(final JTextComponent c) { if (!c.isEnabled()) { return disabledColor;