Making Eclipse look more beautiful on Linux

  • 0
You may have noticed that Eclipse, other than on the windows OS, looks kind of clumpsy on Linux. This is because the fonts are too heavy and big, at least for my taste.

Changing the font size via Window --> Preferences only affects the Editor font sizes. But that's not enough. So here's a workaround to change the font size of all the menus, dialogs, etc. in Eclipse on Linux.

In your home directory create a file named: ~/.gtkrc-eclipse with the following content:

 style "eclipse" {  
     font_name = "Sans Condensed 8"  
 }  
 class "GtkWidget" style "eclipse"  

Now you can start Eclipse with a this command:

 GTK2_RC_FILES=/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:/home/user/.gtkrc-eclipse '<path to your eclipse bin>'  

Or if you want to create an Launcher icon use this command:

 env GTK2_RC_FILES=/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:/home/user/.gtkrc-eclipse '<path to your eclipse bin>'  

Now you should see way smaller fonts in the menus and dialogs of Eclipse.
But what's with the Tabs? They have still too large fonts. In order to change the font size of tabs, we have to tweak a little more:

In your eclipse installation directory go to:
 /plugins/org.eclipse.platform_*/css  

and open e4_default_gtk.css with your text editor.
Here you can see a section similar to this:

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

Simply change the font size or erase this line.
Restart eclipse and obtain the results.

--
This workaround was tested on Xubuntu 13.10 and LMDE Cinnamon with Eclipse Kepler.

No comments:

Post a Comment