| How to use/modify eclipse default Themes in RCP demo [message #1851458] |
Wed, 06 April 2022 05:04 |
Eclipse User |
|
|
|
Hi,
I want to use/modify eclipse default Themes in a Demo project to experiment with styling for my RCP product.
I create a Project in Eclipse 2022-03 based on "Eclipse RCP application" template with demo parts and E4LifeCycle class.
Now I add plugin dependency for "org.eclipse.e4.ui.css.swt.theme". (This plugin is already part of product file content list in this demo application.)
I remove the static product property "applicationCSS" and create a theme extension "TestCSS.theme" in plugin.xml which basestylesheeturl refers to empty file "css/default.css".
To activate my theme I add an "onStartup" method in E4LifeCycle which reacts to "UIEvents.UILifeCycle.APP_STARTUP_COMPLETE". Here I access IThemeEngine from application context and setup my theme "TestCSS.theme".
In order to access eclipse default themes I add "org.eclipse.ui.themes" as plugin dependency and also to product-content.
To see a result I start with Dark Theme and add a css import to file "css/default.css":
@import url("platform:/plugin/org.eclipse.ui.themes/css/e4-dark_win.css");
This works, at least the UI is in a dark mode. But when I use Windows default theme the UI now looks not as expected:
@import url("platform:/plugin/org.eclipse.ui.themes/css/e4_default_win.css");
The border of part/partStack is all solid black (see attached screenshot).

I take a look into the referenced CSS files and also analyze with CSS spy. Here I see that all border colors are 0x000000 but I don't know why.
Maybe anyone here can help. The Demo project attached as ZIP file.
Thanks
Felix
|
|
|
Powered by
FUDForum. Page generated in 0.58010 seconds