Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 306695 - Setting the background does not work if rounded borders are set
Summary: Setting the background does not work if rounded borders are set
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.3 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 307216
Blocks:
  Show dependency tree
 
Reported: 2010-03-22 07:18 EDT by Ivan Furnadjiev CLA
Modified: 2010-03-29 10:49 EDT (History)
1 user (show)

See Also:


Attachments
fix (2.50 KB, patch)
2010-03-29 06:42 EDT, Tim Buschtoens CLA
no flags Details | Diff
corrected patch (2.50 KB, patch)
2010-03-29 08:54 EDT, Tim Buschtoens CLA
ruediger.herrmann: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Furnadjiev CLA 2010-03-22 07:18:01 EDT
Steps to reproduce:
1. Start Control Demo -> CompositeTab
2. Select BORDER checkbox
3. Fill "Rounded border" section: for my text I set all fields to 3 and color to green.
4. Press "Rounded border" Set button
5. Now "Background" button has no effect
6. Deselecting the BORDER checkbox and background color appears
Tested on Windows, FF 3.6, IE8, Chrome 5 and Safari 4.0.5.
Comment 1 Tim Buschtoens CLA 2010-03-26 12:47:45 EDT
The problem is that GraphicsMixin can not display an image and a color as a background at the same time. Since in css the image is rendered above the color (can be seen with transparent images), the image gets priority. In case of Composite, backgroundImage is set to blank.gif in the default themeing. This is due to bug 299629. Since blank.gif is 100% transparent, the effect is the same as if neither backgroundImage nor backgroundColor were set. (Even though a color is set.)

The best solution would be to enable GraphicsMixin to behave like CSS, but that would require more complex changes and a second SVG/VML-element to display both the image and the color.

The quicker solution would be to set the image to none and solve 299629 on the client side. The composite should automatically set blank.gif when neither backgroundImage nor backgroundColor are set.

Currently, this is prevented by Bug 307216.
Comment 2 Tim Buschtoens CLA 2010-03-29 06:42:31 EDT
Created attachment 163247 [details]
fix

Sets backgroundImage to none and implements a new fix for 299629. 

This fix has one known issue: When two composites overlap, and the composite in front has no background (image, color or gradient), AND is changed back and forth between rounded and normal border, it will stop capturing mouse-events in IE. If this is acceptable, we should leave a comment on 299629 after comitting this patch.
Comment 3 Tim Buschtoens CLA 2010-03-29 08:54:29 EDT
Created attachment 163259 [details]
corrected patch

This is the right one.
Comment 4 Rüdiger Herrmann CLA 2010-03-29 10:48:27 EDT
Applied patch to CVS HEAD