Bug 81961 - [Forms] Section (ExpandableComposite) title label background color overrides gradient when using TITLE_BAR style
Summary: [Forms] Section (ExpandableComposite) title label background color overrides ...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P4 normal (vote)
Target Milestone: 3.2 M5   Edit
Assignee: Dejan Glozic CLA
QA Contact:
URL:
Whiteboard:
Keywords: polish
Depends on: 29994
Blocks:
  Show dependency tree
 
Reported: 2004-12-28 06:46 EST by Roland Tepp CLA
Modified: 2006-02-16 16:16 EST (History)
0 users

See Also:


Attachments
Image showing the ugly behavior of the Section title (440 bytes, image/png)
2004-12-28 06:53 EST, Roland Tepp CLA
no flags Details
The sample using RC1. (3.13 KB, image/gif)
2005-06-02 11:17 EDT, Dejan Glozic CLA
no flags Details
8 times magnified header from Attachment #22236 (751 bytes, image/png)
2005-06-02 12:01 EDT, Roland Tepp CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Tepp CLA 2004-12-28 06:46:17 EST
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.
Comment 1 Roland Tepp CLA 2004-12-28 06:53:02 EST
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));
...
Comment 2 Dejan Glozic CLA 2005-06-02 11:17:56 EDT
Created attachment 22236 [details]
The sample using RC1.
Comment 3 Dejan Glozic CLA 2005-06-02 11:18:26 EDT
Cannot reproduce using RC1 (see attachment).
Comment 4 Roland Tepp CLA 2005-06-02 12:01:32 EDT
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.
Comment 5 Roland Tepp CLA 2005-06-02 12:11:34 EDT
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
Comment 6 Dejan Glozic CLA 2005-06-02 12:57:17 EDT
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.
Comment 7 Roland Tepp CLA 2005-06-16 04:40:03 EDT
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
Comment 8 Dejan Glozic CLA 2006-01-18 19:19:33 EST
Section with TITLE_BAR style is now taking advantage of the background image feature - fixed.