Very large tabs in eclipse panes on Ubuntu

http://stackoverflow.com/questions/11805784/very-large-tabs-in-eclipse-panes-on-ubuntu

ou can edit Eclipse's CSS instead of messing with the GTK theme.

In your Eclipse directory find the file plugins/org.eclipse.platform_4.2.*/css/e4_default_gtk.css (there's an * in there, because I guess that the version may change in the future or may be different already). In this file there's a CSS class:

.MPartStack {
    font-size: 11;
   swt-tab-height: 22px; swt-simple: false; swt-mru-visible: false; }

And you have two possible solutions:

  1. change font-size to something smaller
  2. just comment out or remove font-size from this class (works well for me)

And that should do the trick.

###########

Tab width

在eclipse中设置tab size的地方有多个

1:window——preference——General——Editor——Text Editor设置页面:Display Tab Width

2:window——preference——Java——Code Style——Formatter设置页面,Edit,在弹出的Editor profile窗口中,Indentation卡片,设置Indentation Size和Tab Size。

3:如果安装了Myeclipse,那么在window——preference——Myeclipse——Editor——Common Editor Preference中Apperance卡片,设置Tab Size。

##########

 

修改或者新建(系统默认是没有的)

  /home/Your_username/.gtkrc-2.0  (ubuntu中 . 开头的文件默认是隐藏文件,快捷键Ctrl+H可显示隐藏文件)

复制如下的内容:

01 style "gtkcompact" {
02 font_name="Sans 9"
03 GtkButton::default_border={0,0,0,0}
04 GtkButton::default_outside_border={0,0,0,0}
05 GtkButtonBox::child_min_width=0
06 GtkButtonBox::child_min_heigth=0
07 GtkButtonBox::child_internal_pad_x=0
08 GtkButtonBox::child_internal_pad_y=0
09 GtkMenu::vertical-padding=1
10 GtkMenuBar::internal_padding=0
11 GtkMenuItem::horizontal_padding=4
12 GtkToolbar::internal-padding=0
13 GtkToolbar::space-size=0
14 GtkOptionMenu::indicator_size=0
15 GtkOptionMenu::indicator_spacing=0
16 GtkPaned::handle_size=4
17 GtkRange::trough_border=0
18 GtkRange::stepper_spacing=0
19 GtkScale::value_spacing=0
20 GtkScrolledWindow::scrollbar_spacing=0
21 GtkExpander::expander_size=10
22 GtkExpander::expander_spacing=0
23 GtkTreeView::vertical-separator=0
24 GtkTreeView::horizontal-separator=0
25 GtkTreeView::expander-size=8
26 GtkTreeView::fixed-height-mode=TRUE
27 GtkWidget::focus_padding=0
28 }
29 class "GtkWidget" style "gtkcompact"
30 style "gtkcompactextra" {
31 xthickness=1
32 ythickness=1
33 }
34 class "GtkButton" style "gtkcompactextra"
35 class "GtkToolbar" style "gtkcompactextra"
36 class "GtkPaned" style "gtkcompactextra"

 

注销系统再次登录,打开Eclipse 的界面果然是紧凑来,感觉不错,打开其他的程序界面也同样是紧凑来不少。

界面美观了不少,但是Eclipse的自动提示的背景色是黑色的,看起来也非常的难受:

修改方案:

打开终端移动到当前主题目录下:

cd /usr/share/themes/当前的主题名/

   打开gtk-2.0/gtkrc文件:

sudo gedit gtk-2.0/gtkrc 

寻找到“ntooltip_fg_color”和“ntooltip_bg_color”兩個屬性的值,如果沒有改屬性,可以自行添加,其值仿照windows的默認值,分別設定位:

tooltip_fg_color:#000000 

tooltip_bg_color:#f2edbc

然後保存退出,打開系統外觀配置,切換一下主題,當切換回來的時候,修改的效果就生效了。

最后插入图片一张:

Very large tabs in eclipse panes on Ubuntu_第1张图片

Very large tabs in eclipse panes on Ubuntu_第2张图片

__________________________________________________

linux deepin 下,首先找出gtk的相关配置文件:

june@deepin:~>

sudo find / -name "*gtkrc*"

june@deepin:~>

sudo vi /usr/share/themes/Deepin/gtk-2.0/gtkrc

首先如上所述的修改,
然后对于有很多工具条,占用了大量的位置的问题,
我们可以先关闭所有的视图 close all perspectives,

然后再 open perspective 即可去掉多余的工具条。

 

 

 

你可能感兴趣的:(eclipse)