Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to use/modify eclipse default Themes in RCP demo(How to setup a Eclipse 4 RCP Demo with eclipse default themes)
How to use/modify eclipse default Themes in RCP demo [message #1851458] Wed, 06 April 2022 09:04
Felix Hirsch is currently offline Felix HirschFriend
Messages: 9
Registered: May 2016
Location: Aachen, Germany
Junior Member
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).
index.php/fa/41867/0/

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
Previous Topic:Eclipse 2022-03 RCP Export Fails with InjectionException
Next Topic:org/eclipse/jdt/internal/ui/javaeditor/JavaEditor
Goto Forum:
  


Current Time: Thu Apr 18 23:53:55 GMT 2024

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

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

Back to the top