diff --git a/platform/platform-impl/src/com/intellij/util/ui/SwingHelper.java b/platform/platform-impl/src/com/intellij/util/ui/SwingHelper.java index 35719ca9366b..721e04469d24 100644 --- a/platform/platform-impl/src/com/intellij/util/ui/SwingHelper.java +++ b/platform/platform-impl/src/com/intellij/util/ui/SwingHelper.java @@ -435,7 +435,15 @@ public class SwingHelper { textPane.setFont(font != null ? font : UIUtil.getLabelFont()); textPane.setContentType(UIUtil.HTML_MIME); textPane.setEditable(false); - textPane.setBackground(background != null ? background : UIUtil.getLabelBackground()); + if (background != null) { + textPane.setBackground(background); // e.g. UIUtil.getOptionPaneBackground() + } + else { + textPane.setOpaque(false); + if (UIUtil.isUnderNimbusLookAndFeel()) { + textPane.setBackground(UIUtil.TRANSPARENT_COLOR); + } + } textPane.setForeground(foreground != null ? foreground : UIUtil.getLabelForeground()); return textPane; }