Sunday, October 4, 2015

Css Stying in E4 Compatibility Layer

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");

Step 3. add the folowing block to your default.css file:

#MyCSSTagForLabel{
  color: black;
  background: #99b4d1;
  swt-corner-radius: 20;
}

Done!

No comments:

Post a Comment

5 Strategies for Getting More Work Done in Less Time

Summary.    You’ve got more to do than could possibly get done with your current work style. You’ve prioritized. You’ve planned. You’ve dele...