Get styles from current theme CSS [message #1137111] |
Mon, 14 October 2013 05:10  |
Eclipse User |
|
|
|
In RAP, if I do not explicitly set colours of a widget, is there a reliable way to retrieve what the default style properties are? (prior to creating it)
For example, what is the default Button Background Colour, according to the active CSS theme?
I have found that I can use display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND) for some style properties, but not everything is available this way.
As another example, if I want to know the default background colour of a shell, how do I find that? There is no equivalent SWT.COLOR_WINDOW_BACKGROUND.
Thanks, John
|
|
|
Re: Get styles from current theme CSS [message #1137134 is a reply to message #1137111] |
Mon, 14 October 2013 05:30   |
Eclipse User |
|
|
|
Hi John,
there is no API that provides such a functionality. Most of the widgets
have internal ThemeAdapters that read some of the CSS values from the
current theme. See ShellThemeAdapter class for example. But once
again... all these classes are internal and are subject to change
without any further notice.
Best,
Ivan
On 10/14/2013 12:10 PM, John Gymer wrote:
> In RAP, if I do not explicitly set colours of a widget, is there a
> reliable way to retrieve what the default style properties are? (prior
> to creating it)
> For example, what is the default Button Background Colour, according
> to the active CSS theme?
> I have found that I can use
> display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND) for some style
> properties, but not everything is available this way.
> As another example, if I want to know the default background colour of
> a shell, how do I find that? There is no equivalent
> SWT.COLOR_WINDOW_BACKGROUND.
> Thanks, John
>
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
|
Powered by
FUDForum. Page generated in 0.10502 seconds