From 04a9f171351f2fad15284837c8e9257448f11996 Mon Sep 17 00:00:00 2001 From: weisj Date: Tue, 3 Nov 2020 17:28:45 +0100 Subject: [PATCH] Respect custom editor background of spinner if set. --- .../com/github/weisj/darklaf/ui/spinner/DarkSpinnerUI.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/spinner/DarkSpinnerUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/spinner/DarkSpinnerUI.java index b615ace2..c2aa1dad 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/spinner/DarkSpinnerUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/spinner/DarkSpinnerUI.java @@ -212,7 +212,8 @@ public class DarkSpinnerUI extends BasicSpinnerUI implements SpinnerConstants { boolean isCellEditor = SpinnerConstants.isTreeOrTableCellEditor(c); if (editorComponent != null) { - editorComponent.setBackground(bg); + PropertyUtil.installBackground(editorComponent, bg); + bg = editorComponent.getBackground(); } DividedWidgetPainter.paintBackground((Graphics2D) g, c, arc, arrowBounds, bg, spinBg, isCellEditor);