Summary: | [Win/GTK] Control.getForeground() does not honor alpha channel of color | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Niraj Modi <niraj.modi> |
Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | akurtako, ericwill, peter |
Version: | 4.5 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Whiteboard: |
Description
Niraj Modi
2015-03-18 03:43:39 EDT
For GTK, The culprit may be in Widget: void setForegroundColor (long /*int*/ handle, GdkColor color, boolean setStateActive) Alpha is ignored if (OS.GTK3) { GdkRGBA rgba = null; if (color != null) { rgba = new GdkRGBA(); rgba.alpha = 1; >>>>>> alpha is lost here. This may be because the method can't get to SWT's 'alpha' property because it only has access to GdkColor (and not SWT's color). Fixing this might take some time as ~13 widgets might need refactoring so that alpha is passed down to them correctly. It is on my todo list. But it might take some time till I get to it. But if someone is in a rush and has time to work on this in the meantime, I'd be happy to review a patch :-). This has been fixed on GTK3, see bug 477950. |