Chinaunix首页 | 论坛 | 博客
  • 博客访问: 646957
  • 博文数量: 121
  • 博客积分: 4034
  • 博客等级: 上校
  • 技术积分: 1439
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-28 12:42
文章分类

全部博文(121)

文章存档

2017年(8)

2016年(10)

2013年(2)

2012年(3)

2011年(18)

2010年(80)

分类: LINUX

2011-12-22 12:31:49

                            Ubuntu 下Eclipse的小设置

自Ubuntu 10.04以后,会发现系统的tooltips是黑底白字的,这样在Eclipse下就会影响到Javadoc和Declaration。

通过修改系统的tooltips和在Eclipse启动的时候使用算定的GTK配置都是可以解决的。前者可能在系统的外观里设定,但在Ubuntu 11.04之后就有点麻烦,因为在外面里找不到相关的设定。所以推荐使用自定义GTK配置文件的方法。


Python代码  收藏代码
  1. gtk-color-scheme = "tooltip_fg_color:#000000\ntooltip_bg_color:#f7f7f7"  
  2.   
  3. ## setting the tooltips (Back Ground of JavaDoc View and Declaration View)  
  4. style "eclipse-tooltips" = "tooltips" {  
  5.     bg[NORMAL]        = @tooltip_bg_color  
  6.     fg[NORMAL]        = @tooltip_fg_color  
  7. }  
  8.   
  9. widget "gtk-tooltip*" style "eclipse-tooltips"  
保存为文件,然后使用下面的命令来启动就可以了。

GTK2_RC_FILES=/your/path/gtkrc-compact /opt/eclipse/eclipse

需要注意的是style的名字不要定义为:tooltips。否则仍然是使用系统的设定。

 相信也会发现界面上的菜单会撑得比较大,同样也可以通过定义也修改。

Python代码  收藏代码
  1. 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"   
  2.   
  3. style "eclipse-compact" {   
  4.     GtkMenu::vertical_padding=1   
  5.     GtkMenu::horizontal_padding=0   
  6.     GtkMenuBar::internal_padding=0   
  7.     GtkMenuItem::horizontal_padding=4   
  8.     GtkPaned::handle_size=4   
  9.     GtkTreeView::vertical_separator=0   
  10.     GtkTreeView::horizontal_separator=0   
  11.     GtkTreeView::fixed_height_mode=TRUE   
  12.     GtkTreeView::expander_size=9   
  13.     GtkTreeView::expander_spacing=0   
  14.     GtkTreeView::expander_indent=0   
  15.     GtkTreeView::focus_line_width=0   
  16.     GtkTreeView::spacing=0   
  17.     GtkTreeView::row_ending_details=0   
  18.     GtkTreeView::treeview_left=1   
  19.     GtkTreeView::treeview_right=0   
  20.     GtkTreeView::treeview_middle=0   
  21.     GtkTreeView::passive_focus=0   
  22.     GtkTreeView::separator_height=0   
  23.     GtkTreeView::tree_line_pattern="\001\001"   
  24.     GtkTreeView::grid_line_pattern="\001\001"   
  25.     GtkTreeView::grid_line_width=0   
  26.     GtkTreeView::tree_line_width=0   
  27.     GtkToolbar::internal_padding=0   
  28.     GtkToolbar::space_size=10   
  29.     GtkWidget::focus_padding=0   
  30.     xthickness=1   
  31.     ythickness=1   
  32. }   
  33.   
  34. style "eclipse-compact2" {  
  35.     xthickness=1  
  36.     ythickness=1  
  37. }  
  38.   
  39. class "GtkWidget" style "eclipse-compact"   
  40. class "GtkButton" style "eclipse-compact2"   
  41. class "GtkToolbar" style "eclipse-compact2"   
  42. class "GtkPaned" style "eclipse-compact2"  


如果你使用的是ubuntu12.04

Ubuntu12.04下eclipse提示框黑色背景色的修改方法 (2012-05-21 20:08:50)
标签: 杂谈 分类: Linux

eclipse提示框的背景颜色使用的是系统的提示框颜色配置,在windows下为黄色,但在Ubuntu12.04(gnome)下却 是黑色,造成提示内容很难看清。在eclipse中我们是无法修改这个颜色的配置的,只能通过修改系统的颜色配置。在ubuntu11.10以前,我们是 可以能过自定义系统外观来修改这一颜色的配置的,但自ubuntu11.10以后,就没有相关的操作界面了,只能通过修改配置文件的方式实现了。这个文件 位于/usr/share/themes/下对应的主题文件夹下,如你使用Radiance主题,就进入到/usr/share/themes /Radiance/目录下,

cd /usr/share/themes/Radiance

打开gtk-2.0/gtkrc文件,

sudo vim gtk-2.0/gtkrc

修改第一行的tooltip_fg_color和tooltip_bg_color两个属性的值,如果没有改属性,可以自行添加,其值仿照windows的默认值,分别设定位:
tooltip_fg_color:#000000
tooltip_bg_color:#f2edbc

然后保存退出,打开系统外观配置,切换一下主题,当切换回来的时候,修改的效果就生效了。

原文地址:http://blog.csdn.net/bluishglc/article/details/7554602
阅读(2970) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

sunxch10032011-12-31 14:22:44

在右上角关机菜单最下面有系统设置,依次进入外观->主题->自定义->颜色,就有工具栏的修改选项