Tuesday, September 10, 2013

How to change the appearance of Eclipse in Linux

Default fonts size of Eclipse editor , Tab , Menu and other text comes with large. To changes the appearance

1. To change the tab spaces and hight

 ECLIPSE_HOME/plugins/org.eclipse.platform_4.2.0.v201206081400/css/e4_default_gtk.css

.MPartStack {         font-size: 9;         font-family: "Droid Sans";         swt-simple: false;         swt-mru-visible: false; }


2. To change Editor text size and style

Eclipse -> Preference






3. To change Windows , Menu and other negotiations

Somewhere on your home directory, create a gtkrc file (like: ~/.gtkrc-eclipse) with following content:

style "eclipse" {         font_name="Sans Condensed 8"         GtkButton::default_border={0,0,0,0}         GtkButton::default_outside_border={0,0,0,0}         GtkButtonBox::child_min_width=0         GtkButtonBox::child_min_heigth=0         GtkButtonBox::child_internal_pad_x=0         GtkButtonBox::child_internal_pad_y=0         GtkMenuItem::horizontal-padding=0         GtkToolbar::internal-padding=0         GtkToolbar::space-size=0         GtkOptionMenu::indicator_size=0         GtkOptionMenu::indicator_spacing=0         GtkPaned::handle_size=0         GtkRange::trough_border=0         GtkRange::stepper_spacing=0         GtkScale::value_spacing=0         GtkScrolledWindow::scrollbar_spacing=0         GtkExpander::expander-size=0         GtkExpander::expander_spacing=0         GtkTreeView::vertical-separator=0         GtkTreeView::horizontal-separator=0         GtkTreeView::expander-size=0         GtkTreeView::fixed-height-mode=TRUE         GtkWidget::focus_padding=0 } class "GtkWidget" style "eclipse"
Finally, to launch eclipse, use following command line:
GTK2_RC_FILES=/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:/home/user/.gtkrc-eclipse '/opt/eclipse-3.3/eclipse'


or, for a desktop icon:
env GTK2_RC_FILES=/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:/home/user/.gtkrc-eclipse '/opt/eclipse-3.3/eclipse'
Ref : http://techtavern.wordpress.com/2008/09/24/smaller-font-sizes-for-eclipse-on-linux/
http://hwellmann.blogspot.sg/2012/06/fixing-editor-tab-fonts-in-eclipse-juno.html

No comments:

Post a Comment