Inherit CSS style - Shell and Composite [message #658369] |
Tue, 08 March 2011 08:57 |
derhaa Messages: 6 Registered: February 2011 |
Junior Member |
|
|
Ok, there is code snippet and theme.css is below. I want to set background-color of Composite as BLUE, but Shell's background-color wins. Why?
I use actual RAP v1.4 and develop application at actual RAP sources from repository (last update 2 hours ago).
public class ViewTest extends ViewPart {
public static final String ID = "cz.ui.viewtest";
@Override
public void createPartControl(Composite parent) {
parent.setLayout(GLF.gridLayout(1, 5, 5, 5, 5));
Text txt = new Text(parent);
}
@Override
public void setFocus() {
//nothing
}
}
Theme.css
* {
color: black;
font : 11px Arial, Helvetica, sans-serif;
padding:0px;
margin:0px;
spacing:0px;
}
Display {
rwt-shadow-color: #a7a6aa;
rwt-highlight-color: #ffffff;
rwt-darkshadow-color: #85878c;
rwt-lightshadow-color: #dcdfe4;
rwt-thinborder-color: #aca899;
rwt-selectionmarker-color: #fec83c;
rwt-infobackground-color: #ffffff;
}
Composite {
padding: 0px;
opacity: 1;
background-color: blue;
background-image: none;
border: none;
}
Composite[BORDER] {
background-color: blue;
background-image: none;
}
Shell {
border: 1px #808080;
background-color: red;
padding: 3px;
opacity: 1;
background-image: none;
border-radius:0px;
}
Shell-Titlebar {
background-color: #9DA7C3;
background-gradient-color: #9DA7C3;
background-image: gradient( linear, left top, left bottom,
from( #0A246A ), to( #005092 ) );
padding: 2px 5px 2px;
margin: 0px;
height: 22px;
border: none;
border-radius:0px;
color: white;
font : bold 11px Arial, Helvetica, sans-serif;
}
UPDATE:
When I set Composite's background-image. It works and all composites have image, but background color does not work.
[Updated on: Tue, 08 March 2011 09:25] Report message to a moderator
|
|
|
Re: Inherit CSS style - Shell and Composite [message #658626 is a reply to message #658369] |
Wed, 09 March 2011 09:56 |
Ivan Furnadjiev Messages: 2426 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi derhaa,
I've unable to reproduce what you described with current CVS HEAD.
Theming for Shell and Composite works fine for me. Which version of RAP
are you using? Could you provide a complete self-running project to test it?
Best,
Ivan
On 3/8/2011 10:57 AM, derhaa wrote:
> Ok, there is code snippet and theme.css is below. I want to set
> background-color of Composite as BLUE, but Shell's background-color
> wins. Why?
>
> public class ViewTest extends ViewPart {
>
> public static final String ID = "cz.ui.viewtest";
> @Override
> public void createPartControl(Composite parent) {
> parent.setLayout(GLF.gridLayout(1, 5, 5, 5, 5));
> Text txt = new Text(parent);
> }
>
> @Override
> public void setFocus() {
> //nothing
> }
>
> }
>
>
> Theme.css
>
> * {
> color: black;
> font : 11px Arial, Helvetica, sans-serif;
> padding:0px;
> margin:0px;
> spacing:0px;
> }
> Display {
> rwt-shadow-color: #a7a6aa;
> rwt-highlight-color: #ffffff;
> rwt-darkshadow-color: #85878c;
> rwt-lightshadow-color: #dcdfe4;
> rwt-thinborder-color: #aca899;
> rwt-selectionmarker-color: #fec83c;
> rwt-infobackground-color: #ffffff;
> }
>
> Composite {
> padding: 0px;
> opacity: 1;
> background-color: blue;
> background-image: none;
> border: none;
> }
>
> Composite[BORDER] {
> background-color: blue;
> background-image: none;
> }
>
> Shell {
> border: 1px #808080;
> background-color: red;
> padding: 3px;
> opacity: 1;
> background-image: none;
> border-radius:0px;
> }
>
> Shell-Titlebar {
> background-color: #9DA7C3;
> background-gradient-color: #9DA7C3;
> background-image: gradient( linear, left top, left bottom,
> from( #0A246A ), to( #005092 ) );
> padding: 2px 5px 2px;
> margin: 0px;
> height: 22px;
> border: none;
> border-radius:0px;
> color: white;
> font : bold 11px Arial, Helvetica, sans-serif;
> }
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.09038 seconds