Linux下的Eclipse 3.7 紧凑布局样式美化

Linux版的Eclipse默认使用GTK+2.0的控件,所以在默认的情况下,会和其他GTK应用程序(如OpenOffice.org)一样给人一 种不够密实的感觉。当然,这和GNOME的设计哲学不无关系,不过这不是本文主旨,就不深入讨论了,进入正题讲讲如何调整Eclipse树状列表的显示密 度。 基于GTK+2.0的程序在启动时会到用户的home目录找GTK+2.0的配置文件,即~/.gtkrc-2.0,Ubuntu下默认没有这个文件,需要我们自己创建。打开你习惯的编辑器,加入如下代码:

 

 

style "gtkcompact" {

font_name="Sans 9"

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

GtkMenu::vertical-padding=1

GtkMenuBar::internal_padding=0

GtkMenuItem::horizontal_padding=4

GtkToolbar::internal-padding=0

GtkToolbar::space-size=0

GtkOptionMenu::indicator_size=0

GtkOptionMenu::indicator_spacing=0

GtkPaned::handle_size=4

GtkRange::trough_border=0

GtkRange::stepper_spacing=0

GtkScale::value_spacing=0

GtkScrolledWindow::scrollbar_spacing=0

GtkExpander::expander_size=10

GtkExpander::expander_spacing=0

GtkTreeView::vertical-separator=0

GtkTreeView::horizontal-separator=0

GtkTreeView::expander-size=8

GtkTreeView::fixed-height-mode=TRUE

GtkWidget::focus_padding=0

}

class "GtkWidget" style "gtkcompact"

 

style "gtkcompactextra" {

xthickness=1

ythickness=1

}

class "GtkButton" style "gtkcompactextra"

class "GtkToolbar" style "gtkcompactextra"

class "GtkPaned" style "gtkcompactextra"

posted on 2012-08-15 23:14  要么牛逼,要么滚蛋  阅读(769)  评论(0编辑  收藏  举报

导航