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

Bug 370061

Summary: [Controls Demo] Provide a style contributions for "special-red" and "special-blue" variants
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: DemoAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: nmussin, tbuschto
Version: 1.5   
Target Milestone: 1.5 M6   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 362166    
Bug Blocks:    
Attachments:
Description Flags
adds theme contribution to default theme with properties for custom variants 'special-red' and 'special-blue' ivan: iplog+

Description Ivan Furnadjiev CLA 2012-01-29 05:00:04 EST
Controls Demo has a tab called "Variants". When running the demo with the default theme this tab is useless as "special-red" and "special-blue" variants are missing from the default theme. I suggest to provide a contribution to the default theme with these custom variants defined.
Comment 1 Nick Mussin CLA 2012-01-30 08:08:39 EST
This bug is blocked by 362166. By using variants, the widgets cannot be fully re-styled as subwidgets still use the default theme. One could only try to define a variant that somehow matches the default look and feel (for example, it's not possible to create a dark combobox, because Combo-Button will remain default-styled).
Comment 2 Ivan Furnadjiev CLA 2012-01-30 09:48:58 EST
My idea was to extract and improve the "special-red" and "special-blue" related definitions from the old "tea" theme (org.eclipse.rap.demo\theme1\theme.css) and set them as a theme contribution to the default theme. Here is the segment from the "tea" theme:
/* Custom variants */

.special-red {
  color: red;
  background-color: #ffaaaa;
}

.special-red:disabled {
  color: white;
}

.special-blue {
  color: blue;
  background-color: #aaaaff;
}

.special-blue:disabled {
  color: white;
}

Shell.special-red {
  border: 3px solid red;
  padding: 10px;
}

Shell.special-blue {
  border: 3px solid blue;
  padding: 10px;
}

Link-Hyperlink.special-red {
  color: #ffaaaa;
}

Link-Hyperlink.special-blue {
  color: #aaaaff;
}

Button[PUSH].special-red, Button[TOGGLE].special-red {
  border: 2px solid red;
}
Comment 3 Nick Mussin CLA 2012-01-30 11:49:40 EST
all right, I will use the custom variants from "tea" theme and just adjust the colors a bit.
Comment 4 Nick Mussin CLA 2012-01-31 04:59:53 EST
Created attachment 210302 [details]
adds theme contribution to default theme with properties for custom variants 'special-red' and 'special-blue'
Comment 5 Ivan Furnadjiev CLA 2012-02-01 05:21:57 EST
Applied patch to CVS HEAD.