This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 420035 - [CSS] Support SWT color constants in gradients
Summary: [CSS] Support SWT color constants in gradients
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.4 M3   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 417726
  Show dependency tree
 
Reported: 2013-10-21 18:49 EDT by Robin Stocker CLA
Modified: 2013-11-04 09:56 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Stocker CLA 2013-10-21 18:49:24 EDT
In bug 402530, support for SWT color constants was added for specifying CSS colors, like this (it is translated to the color of SWT.COLOR_WIDGET_FOREGROUND):

  background-color: COLOR-WIDGET-FOREGROUND;

Currently, using such a constant is not possible for gradient definitions. Patch upcoming.
Comment 1 Robin Stocker CLA 2013-10-21 18:52:34 EDT
Implementation for review:

https://git.eclipse.org/r/17617
Comment 3 Daniel Rolka CLA 2013-10-29 12:18:35 EDT
Verified in the build: I20131028-2000
Comment 4 Lars Vogel CLA 2013-11-02 20:27:13 EDT
Looks to me that the changes in Bug 419016 did break this change.

Example: if I use the following in the stylesheet, the DnD color is not set to red.

.DragFeedback {
    background-color: SWT.COLOR_RED;
}
Comment 5 Robin Stocker CLA 2013-11-03 06:03:26 EST
(In reply to Lars Vogel from comment #4)
> Looks to me that the changes in Bug 419016 did break this change.
> 
> Example: if I use the following in the stylesheet, the DnD color is not set
> to red.
> 
> .DragFeedback {
>     background-color: SWT.COLOR_RED;
> }

Still works here with the changes of bug 419016, but you have to use the colors like this (remove "SWT.", replace "_" by "-"):

background-color: COLOR-RED;
Comment 6 Lars Vogel CLA 2013-11-03 13:50:51 EST
> Still works here with the changes of bug 419016, but you have to use the
> colors like this (remove "SWT.", replace "_" by "-"):
> 
> background-color: COLOR-RED;

Yes, sorry.
Comment 7 Lars Vogel CLA 2013-11-03 13:51:28 EST
Verified again in 4.4 M3
Comment 8 Lars Vogel CLA 2013-11-03 14:47:39 EST
Still something is strange. In M3 (Build id: I20131030-2000) the background-color COLOR-LIST-SELECTION is not the same as under M2. M2 shows a nice orange which M2 shows white.

.DragFeedback {
    background-color: COLOR-LIST-SELECTION;
}

I leave the Bug in status FIXED, but Robin you might want to check that again.
Comment 9 Lars Vogel CLA 2013-11-04 09:56:30 EST
> I leave the Bug in status FIXED, but Robin you might want to check that
> again.

I think the switch to GTK3 is responsible for this different behavior. I created Bug 420989 for SWT.