diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/Section.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/Section.java index e9ef4675c63..addb92ebb54 100644 --- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/Section.java +++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/Section.java @@ -464,11 +464,12 @@ protected void onPaint(PaintEvent e) { } private void updateHeaderImage(Color bg, Rectangle bounds, int theight, int realtheight) { Color gradient = getTitleBarGradientBackground() != null ? getTitleBarGradientBackground() : getBackground(); - if (gradient.equals(bg)) { - // Flat look: gradient and background are the same, no image needed + if (gradient.equals(bg) && bg.equals(getBackground())) { + // Section is uniform; the body background already fills everything. super.setBackgroundImage(null); return; } + // Image paints the title bar contrast against the section body. Image image = FormImages.getInstance().getSectionGradientImage(gradient, bg, realtheight, theight, marginHeight, getDisplay()); super.setBackgroundImage(image);