Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370061 - [Controls Demo] Provide a style contributions for "special-red" and "special-blue" variants
Summary: [Controls Demo] Provide a style contributions for "special-red" and "special-...
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: Demo (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 1.5 M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 362166
Blocks:
  Show dependency tree
 
Reported: 2012-01-29 05:00 EST by Ivan Furnadjiev CLA
Modified: 2012-02-01 05:22 EST (History)
2 users (show)

See Also:


Attachments
adds theme contribution to default theme with properties for custom variants 'special-red' and 'special-blue' (2.18 KB, patch)
2012-01-31 04:59 EST, Nick Mussin CLA
ivan: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.