Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 430208

Summary: Add support for RGBA or 'transparent' color
Product: [Eclipse Project] Platform Reporter: Andrea Guarinoni <andrea.guarinoni>
Component: SWTAssignee: Stefan Winkler <stefan>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: bsd, daniel.rolka, daniel_megert, Lars.Vogel, niraj.modi, stefan
Version: 4.4   
Target Milestone: 4.5 M5   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 430848    

Description Andrea Guarinoni CLA 2014-03-12 12:02:44 EDT
This can be assumed as an alternative/workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=419377
Comment 1 Daniel Rolka CLA 2014-03-13 03:17:18 EDT
I'm not sure if we are able to fix it without the SWT modification. Maybe we can generate proper images and use it as the background, but it is the workaround in my opinion

Daniel
Comment 2 Stefan Winkler CLA 2014-04-18 10:45:53 EDT
We can at least handle transparency for Button and Label widgets.
If both background and backgroundImage are set to null for these widgets, they return drawsBackground() == false which has the effect of having a transparent background.

See my patch here:

https://git.eclipse.org/r/25276
Comment 3 Brian de Alwis CLA 2014-04-21 10:21:02 EDT
I'm weakly -1 on this change (and I'm sorry I haven't gotten to the "inherit" change).

I think the use of reflection reflects my problem with this proposal change: I don't think SWT truly supports "transparent" but "inherit".

But SWT and CSS's use of heredity seem different.  CSS can toggle inheritance on a per-child basis where as SWT controls this using the background-mode.  But I haven't delved sufficiently into how they differ, or how we can map one to the other.

My fear is that we already have some behaviour that is fundamentally opposite to the CSS standard (viz margin and padding in bug 364070‎), and we might introduce conflicts with inherit and transparency.

Stefan, would you mind looking deeper at the CSS standards and summarize how transparency and inherit might map to SWT?
Comment 4 Stefan Winkler CLA 2014-04-24 11:37:02 EDT
Hi Brian,

thanks for your comments on this issue and on Bug 419377. 
I'll go ahead and investigate what the CSS specs say; I will need some time though.
Comment 5 Daniel Rolka CLA 2014-05-06 04:54:01 EDT
It has to be mainly fixed on the SWT site. Next we can update the CSSEngine with the change

Daniel
Comment 6 Lars Vogel CLA 2015-01-26 06:11:11 EST
SWT has now has support for transparency, see https://www.eclipse.org/eclipse/news/4.5/M5/ or Bug 435384.

For SWT it is just another color so I think there is nothing left for platform to  do. To use this in our themes we should open a new bug.
Comment 7 Niraj Modi CLA 2015-01-28 07:29:17 EST

*** This bug has been marked as a duplicate of bug 435384 ***