Community
Participate
Working Groups
When using TITLE_BAR style for the Section widget and specifying title colors, the title label is drawn with opaque background color, which looks rather nasty, if combined with gradient style title background colors (setTitleBackground(bg) or setTitleGradientBackground(gbg) was set). When title background and/or gradient background are set, the label draws a box with the solid background color of the title area, which kind of defeats the purpose of the gradient. Expected behavior would be to that the title would just have a label with the transparent background.
Created attachment 16858 [details] Image showing the ugly behavior of the Section title The simplified code snippet for detting this would be following: ... Section unit = toolkit.createSection(container, Section.TITLE_BAR | Section.DESCRIPTION); unit.setText("Shop 1"); unit.setDescription("Some dummy description for this section"); unit.setTitleBarForeground(toolkit.getColors().getColor(COLOR_BLACK)); unit.setTitleBarGradientBackground(toolkit.getColors().getColor(COLOR_GREEN)); ...
Created attachment 22236 [details] The sample using RC1.
Cannot reproduce using RC1 (see attachment).
Created attachment 22240 [details] 8 times magnified header from Attachment #22236 [details] As You can see from the magnified header, the label background is still overlaying the gradient background. The difference is just less noticeable.
Reopening this bug. What if I use more radical color scheme? You should also take a look at the Attachment 21709 [details] of Bug 96582
This is a different issue. Label widget is opaque (no transparent widgets in SWT), so it can only be set to the solid color. This is a known limitation that will not be addressed in 3.1. The workaround is to use light airy gradient that minimises the problem (as we do). Post 3.1, we will see how to render the label in a transparent way.
This is a different issue. Label widget is opaque (no transparent widgets in SWT), so it can only be set to the solid color. This is a known limitation that will not be addressed in 3.1. The workaround is to use light airy gradient that minimises the problem (as we do). Post 3.1, we will see how to render the label in a transparent way. *** No. It is not a different issue. This bug isabout the title label not being transparent. and You can not pretend that the problem just went away by simply slapping an inch thick layer of makeup to hide your blisters. This workaround is exactly what You are saying it is - just a workaround - nothing more and nothing less. That said - I mark this bug as dependant on Bug 29994 for now
Section with TITLE_BAR style is now taking advantage of the background image feature - fixed.