Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Get styles from current theme CSS(How to get current theme CSS properties)
Get styles from current theme CSS [message #1137111] Mon, 14 October 2013 05:10 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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/
Re: Get styles from current theme CSS [message #1137140 is a reply to message #1137134] Mon, 14 October 2013 05:34 Go to previous message
Eclipse UserFriend
Thanks Ivan.
Perhaps when you have 'lots of spare time' (!) you could provide such an API?
It isn't high priority though, and I'm sure you've got more important things to do in the meantime.
Cheers, John
Previous Topic:Zooming not working in 2.1.1
Next Topic:Deploying single sourced RAP/SWT application
Goto Forum:
  


Current Time: Wed Jul 23 02:30:06 EDT 2025

Powered by FUDForum. Page generated in 0.05205 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top