Problem with theming Label font [message #125539] |
Wed, 18 March 2009 11:47 |
Eclipse User |
|
|
|
Originally posted by: info.dp4.de
Hello,
I'm trying to theme a RAP Label, but it works only for some color
properties, not for the font:
creation:
import org.eclipse.swt.widgets.Label;
Label label = new Label(parent, SWT.LEFT);
label.setData(WidgetUtil.CUSTOM_VARIANT, "Header");
label.setText("some important text");
theme css:
Label.Header {
font: Arial 24px bold ;
background-color: blue;
}
so the background color is applied, but not the font information.
Is this a limitation or am I doing something wrong here?
Regards,
Stephan
Germany
|
|
|
|
|
Re: Problem with theming Label font [message #125617 is a reply to message #125580] |
Wed, 18 March 2009 15:07 |
|
Stephan Scholz wrote:
> Thanks Ralf,
>
> but this does not help.
>
> Using the font statement for all Controls with
>
> * {
> font: <attributes in any order>
> }
>
> works well, but not for "Label" or "Label.subclass" statements :(
It works here. Please check with a stylesheet that contains only the one
Label.Header { font: ... } rule. If this works then there is probably
another matching rule with a higher specificity in your stylesheet.
Ralf
|
|
|
Re: Problem with theming Label font [message #125680 is a reply to message #125617] |
Wed, 18 March 2009 17:55 |
Eclipse User |
|
|
|
Originally posted by: info.dp4.de
thanks again, I fixed the problem now.
I was using RAP in version 1.1.1.200809xx instead of 1.2.0.200812xx.
The old version doesn't contain the "font" style in the label.theme.xml
description file.
Using the new RAP in my target platform, it works as expected :)
Regards,
Stephan
> Stephan Scholz wrote:
>> Thanks Ralf,
>>
>> but this does not help.
>>
>> Using the font statement for all Controls with
>>
>> * {
>> font: <attributes in any order>
>> }
>>
>> works well, but not for "Label" or "Label.subclass" statements :(
>
> It works here. Please check with a stylesheet that contains only the one
> Label.Header { font: ... } rule. If this works then there is probably
> another matching rule with a higher specificity in your stylesheet.
>
> Ralf
|
|
|
Powered by
FUDForum. Page generated in 0.02927 seconds