Friday, November 9, 2012

Customize Eclipse Juno Themes

Themes are applied via CSS files. The standard eclipse installation stores them in <eclipse home>/plugins/org.eclipse.platform<VERSION>/css. There's also an images directory. The css files can be modified in place, but customizations are lost when the platform is upgraded, e.g., from 4.2 to 4.2.1. The modified CSS files can also be stored in a directory ~/.e4css to avoid the issue.

Example: Make part title fonts smaller in the GTK theme

Copy e4_default_gtk.css into ~/.e4css and change the font size from 11 to 9 pt.

.MPartStack {
    font-size: 9;
    swt-simple: false;
    swt-mru-visible: false;
}
 

To get rid of the background image for the toolbar apply the following change.

 .MTrimBar#org-eclipse-ui-main-toolbar  {
    background-image:  none; /* url(./gtkGrey.png);*/   
}

No comments:

Post a Comment