| Summary: | [Theming] CSS gradient overrides background image set in java | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Istvan Ballok <Istvan.Ballok> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | tbuschto | ||||
| Version: | 1.4 | ||||||
| Target Milestone: | 1.4 M4 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Istvan Ballok
Created attachment 182738 [details]
proposed patch for the Maintenance branch (similar for trunk)
change the priority of gradient/image/solid in GraphicsMixin#_handleGfxBackground
before:
1) gradient 2) image 3) solid
after:
1) image 2) gradient 3) solid
motivation: if we have a "confict": both image and gradient is set,
then always the image should win, because the conflict can happen
only when the gradient is set in CSS (it is not possible to set it
in java) and the image in the API (it is not possible to set it in CSS
if a gradient is already set).
And if the same property is set in Java and CSS, java should win.
-> image has a higher priority than the gradient
Applied patch (with minimal changes) and a new test to CVS HEAD. The priority is now image > gradient > color. Since only image OR gradient can be set by CSS, nothing changes there. Setting a gradient by Java-API is not supported, and setting a background-image will no overwrite a gradient in any case. However, setting a background-color by API on a widget with the css-property background-image set will still be ignored. This issue would be much more difficult to fix. |