Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » E4 CSS engine - Platform and user-defined colors
E4 CSS engine - Platform and user-defined colors [message #1018261] Wed, 13 March 2013 14:14 Go to next message
Istvan Meszaros is currently offline Istvan MeszarosFriend
Messages: 46
Registered: October 2009
Member
Hello folks!

Is there any way to use platform-default colors, or custom color constants in E4 css declarations?

Something like this:

Text.valid {
    background-color: SWT.COLOR_LIST_BACKGROUND;
    color: SWT.COLOR_WIDGET_FOREGROUND;
}


Text.invalid {
    background-color: #f00;
    color: #fff;
}

// or


Text.invalid {
    background-color: invalid-background;
    color: invalid-foreground;
}

// and something like this:

engine.defineColorConstant("invalid-background", "#f00");



Or is there any other way to erase all styles applied to a widget an let platform defaults apply?

[Updated on: Wed, 13 March 2013 14:15]

Report message to a moderator

Re: E4 CSS engine - Platform and user-defined colors [message #1022758 is a reply to message #1018261] Fri, 22 March 2013 13:24 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 194
Registered: January 2012
Senior Member

Th ability to reference SWT color constants was just added to 4.3:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=402530

Brian,


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:Menu disabled in RCP with Kepler M4
Next Topic:Eclipse 4 and native code
Goto Forum:
  


Current Time: Mon Dec 22 00:41:08 GMT 2014

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

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