diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkToolTipUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkToolTipUI.java index 5920e22c..b0625cc6 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkToolTipUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkToolTipUI.java @@ -178,8 +178,19 @@ public class DarkToolTipUI extends BasicToolTipUI implements PropertyChangeListe startAnimation(); } else { Window window = DarkUIUtil.getWindow(c); - if (window != null && window.getOpacity() != 1 && !transparencySupported(window)) { - window.setOpacity(1); + if (window != null) { + if (window.getOpacity() != 1 && !transparencySupported(window)) { + window.setOpacity(1); + } + /* + * In non opaque windows on Windows subpixel AA doesn't work. The translucent background isn't needed + * for the plain tooltip style, so we set it here. + * + * See https://bugs.openjdk.java.net/browse/JDK-8215980?attachmentOrder=desc + */ + if (style == ToolTipStyle.PLAIN) { + window.setBackground(c.getBackground()); + } } } GraphicsContext context = GraphicsUtil.setupAntialiasing(g);