自Ubuntu 10.04以后,会发现系统的tooltips是黑底白字的,这样在Eclipse下就会影响到Javadoc和Declaration。
通过修改系统的tooltips和在Eclipse启动的时候使用算定的GTK配置都是可以解决的。前者可能在系统的外观里设定,但在Ubuntu 11.04之后就有点麻烦,因为在外面里找不到相关的设定。所以推荐使用自定义GTK配置文件的方法。
gtk-color-scheme = "tooltip_fg_color:#000000\ntooltip_bg_color:#f7f7f7"
## setting the tooltips (Back Ground of JavaDoc View and Declaration View)
style "eclipse-tooltips" = "tooltips" {
bg[NORMAL] = @tooltip_bg_color
fg[NORMAL] = @tooltip_fg_color
}
widget "gtk-tooltip*" style "eclipse-tooltips"
保存为文件,然后使用下面的命令来启动就可以了。
GTK2_RC_FILES=/your/path/gtkrc-compact /opt/eclipse/eclipse
需要注意的是style的名字不要定义为:tooltips。否则仍然是使用系统的设定。
相信也会发现界面上的菜单会撑得比较大,同样也可以通过定义也修改。
gtk_icon_sizes = "panel_menu=16,16:panel=16,16:gtk_menu=12,12:gtk_small_toolbar=16,16:gtk_large_toolbar=16,16:gtk_button=16,16:gtk_dialog=16,16:gtk_dnd=16,16"
style "eclipse-compact" {
GtkMenu::vertical_padding=1
GtkMenu::horizontal_padding=0
GtkMenuBar::internal_padding=0
GtkMenuItem::horizontal_padding=4
GtkPaned::handle_size=4
GtkTreeView::vertical_separator=0
GtkTreeView::horizontal_separator=0
GtkTreeView::fixed_height_mode=TRUE
GtkTreeView::expander_size=9
GtkTreeView::expander_spacing=0
GtkTreeView::expander_indent=0
GtkTreeView::focus_line_width=0
GtkTreeView::spacing=0
GtkTreeView::row_ending_details=0
GtkTreeView::treeview_left=1
GtkTreeView::treeview_right=0
GtkTreeView::treeview_middle=0
GtkTreeView::passive_focus=0
GtkTreeView::separator_height=0
GtkTreeView::tree_line_pattern="\001\001"
GtkTreeView::grid_line_pattern="\001\001"
GtkTreeView::grid_line_width=0
GtkTreeView::tree_line_width=0
GtkToolbar::internal_padding=0
GtkToolbar::space_size=10
GtkWidget::focus_padding=0
xthickness=1
ythickness=1
}
style "eclipse-compact2" {
xthickness=1
ythickness=1
}
class "GtkWidget" style "eclipse-compact"
class "GtkButton" style "eclipse-compact2"
class "GtkToolbar" style "eclipse-compact2"
class "GtkPaned" style "eclipse-compact2"
注:以上的设置内容有来源于网络的。