I can apply Css Styling in my Eclipse 3.x plugin using following steps:
Step 1. Configuring CSS Stylesheets:
1.1 add a css file
1.2 add a theme using theme extension point
1.3
Step 2. add css id/class to your swt control:
final Composite composite = new Composite(parent, SWT.NONE);
composite.setData("org.eclipse.e4.ui.css.id","MyCSSTagForLabel");
composite.setData("org.eclipse.e4.ui.css.id","MyCSSTagForLabel");
Step 3. add the folowing block to your default.css file:
#MyCSSTagForLabel{
color: black;
background: #99b4d1;
swt-corner-radius: 20;
}
Done!
Done!
No comments:
Post a Comment