Community
Participate
Working Groups
The gradient/image used as background for the title of Section widget cannot be customized. Changing the value of 'background', 'background-color', 'background-image' or 'swt-background-mode' have no effect on the top color of the gradient used as background. According to org.eclipse.ui.forms.widgets.Section documentation this might be supported.
Could you please attach any CSS snippet that shows the issue? Daniel
Created attachment 240873 [details] Result of trying to style Section et al. Form > LayoutComposite Section, Form > LayoutComposite Section > * { background-color: #A9D #ED7 0% 100% false; } Form > LayoutComposite Section > LayoutComposite Text { background-color: #A76 #49D 0% 100% false; }
Section draws from the Background color to the color set by the setTitleBarBackground() private void updateHeaderImage(Color bg, Rectangle bounds, int theight, int realtheight) { Image image = FormImages.getInstance().getGradient(getBackground(), bg, realtheight, theight, marginHeight, getDisplay()); super.setBackgroundImage(image); } I think we need a new CSSSelector to support setting the setTitleBarBackground() method via CSS.
I try to solve that together with Bug 430370.
https://git.eclipse.org/r/23565 To test, add the following to Section { swt-formtitlebackground:#FF0000; } to the e4-dark_partstyle.css file.
Simon, can you take over?
See: https://git.eclipse.org/r/#/c/37145/ Now the title-bar-header will only be gradient, if the setTitleBarGradientBackground() method is used or by using the CSS background-color-gradient-titlebar property.
Merged with https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=7728ea7d570e1ba4c0763d4dcc39e223219fcab0 Thanks Simon. This allows to set the gradient. It does not yet allow to set this via CSS, this is handled by Bug 430370.
.
Test in 4.5.0.I20150126-2000 and found one issue. Follow up in 458649.