theme variants not working on Text and Composite [message #84080] |
Tue, 22 April 2008 18:15 |
Patrick Turcotte Messages: 23 Registered: July 2009 |
Junior Member |
|
|
Hi,
We are trying to use theming variants to change the background color of a ViewPart.
Theming is working, because when we change the value of the global (widget.background) background color in the
..properties file, we can see the result.
But if we set theming variant as
public void createPartControl(Composite parent){
// NOT WORKING
parent.setData(WidgetUtil.CUSTOM_VARIANT, "myvariant");
// NOT WORKING EITHER
Text text = new Text(parent, SWT.NONE);
text.setData(WidgetUtil.CUSTOM_VARIANT, "myvariant");
}
and we define, in .properties file
myvariant/widget.background: 227, 76, 21
myvariant/list.background: red
the result is of the same color as the default/global values.
using RAP-1.1.0-M3
Any help appreciated.
Thanks,
Patrick
|
|
|
Re: theme variants not working on Text and Composite [message #84169 is a reply to message #84080] |
Wed, 23 April 2008 07:20 |
Eclipse User |
|
|
|
Originally posted by: rsternberg.innoopract.com
Hi Patrick,
it's right that in M3 theme variants do not work for some
widgets/theming keys. Composite is one of them, which is already fixed
in CVS HEAD and I'll also fix the Text bug right away. I'm sorry for the
inconvenience. We're currently working on the theming subsystem to make
it more flexible and I think it will stabilize in the next weeks.
Best regards,
Ralf
Patrick Turcotte wrote:
> We are trying to use theming variants to change the background color of
> a ViewPart.
>
> Theming is working, because when we change the value of the global
> (widget.background) background color in the .properties file, we can see
> the result.
>
> But if we set theming variant as
>
> public void createPartControl(Composite parent){
> // NOT WORKING
> parent.setData(WidgetUtil.CUSTOM_VARIANT, "myvariant");
>
> // NOT WORKING EITHER
> Text text = new Text(parent, SWT.NONE);
> text.setData(WidgetUtil.CUSTOM_VARIANT, "myvariant");
> }
>
> and we define, in .properties file
>
> myvariant/widget.background: 227, 76, 21
> myvariant/list.background: red
>
> the result is of the same color as the default/global values.
>
> using RAP-1.1.0-M3
>
> Any help appreciated.
>
> Thanks,
>
> Patrick
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01962 seconds