Ubuntu中的Eclipse窗格中有非常大的选项卡 [英] Very large tabs in Eclipse panes on Ubuntu

查看:144
本文介绍了Ubuntu中的Eclipse窗格中有非常大的选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题非常类似于Stack Overflow问题 Ubuntu中Eclipse中的Gigantic Tabs 。 p>

我已经尝试了提供的解决方案,但它们似乎是旧的。我发现解决方案很好地处理工具栏和菜单,但不是解决方案,减少窗格中不成比例的大选项卡(和标签)的大小和填充(请参见下面屏幕中的包资源管理器)。



我对我的操作系统GTK主题的定制方式感到满意,不想改变。有没有快速修复来减少Eclipse中的窗格的选项卡大小?



我在Ubuntu 12.04上使用Eclipse for Mobile Developers(Juno)。我还会提到,我真的很喜欢Eclipse在Windows 7中出现的方式,所以类似的东西是理想的。



这是eclipse的具体我使用的GTK样式:

  styleeclin{
GtkButton :: default_border = {1,1, 1,1}
GtkButton :: default_outside_border = {1,1,1,1}
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 = 1
GtkMenuItem :: horizo​​ntal_padding = 4
GtkToolbar: :internal-padding = 1
GtkToolbar :: space-size = 1
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 :: horizo​​ntal-separator = 0
GtkTreeView :: expander-size = 12
GtkTreeView :: fixed-height-mode = TRUE
GtkWidget :: focus_padding = 0
font_name =解放Sans,Sans Regular 8
}

classGtkWidgetstyleeclin
styleeclin2{
xthickness = 1
ythickness = 1
}

classGtkButton styleeclin2
classGtkToolbarstyleeclin2
classGtkPanedstyleeclin2

这是一个屏幕截图,我的IDE看起来像巨大的选项卡:



解决方案

CSS而不是混淆GTK主题。



在Eclipse目录中找到文件 plugins / org.eclipse.platform_ 4.2。* / css / e4_default_gtk.css (有一个 * 在那里,因为我猜这个版本可能会在将来改变,或者可能是不一样)。在这个文件中有一个CSS类:

  .MPartStack {
font-size:11;
swt-simple:false;
swt-mru-visible:false;
}

您有两种可能的解决方案:


  1. font-size 更小一些

  2. 只需注释掉或删除 font-size 从这个类(对我很好)

做窍门。


My question is very similar to Stack Overflow question Gigantic Tabs in Eclipse on Ubuntu.

I have tried the solutions presented, but they appear to be old. I have found a solution that nicely handles the toolbar and menus, but not a solution that reduces the size and padding of the disproportionately large tabs (and label) within the panes (see the tab "Package Explorer" in the screen below).

I am happy with the way my OS-wide GTK theme is customized and don't want to change that. Is there a quick fix to reduce the tab sizes of the panes in Eclipse?

I'm using Eclipse for Mobile Developers (Juno) on Ubuntu 12.04. I'll also mention that I really like the way Eclipse appears out of the box in Windows 7, so something similar to that would be ideal.

Here are the eclipse specific GTK styles I'm using:

style "eclin" {
    GtkButton::default_border={1,1,1,1}
    GtkButton::default_outside_border={1,1,1,1}
    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=1
    GtkMenuItem::horizontal_padding=4
    GtkToolbar::internal-padding=1
    GtkToolbar::space-size=1
    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=12
    GtkTreeView::fixed-height-mode=TRUE
    GtkWidget::focus_padding=0
    font_name="Liberation Sans,Sans Regular 8"
}

class "GtkWidget" style "eclin"
    style "eclin2" {
    xthickness=1
    ythickness=1
}

class "GtkButton" style "eclin2"
class "GtkToolbar" style "eclin2"
class "GtkPaned" style "eclin2"

Here is a screenshot of what my IDE looks like with the huge tabs:

解决方案

You 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-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.

这篇关于Ubuntu中的Eclipse窗格中有非常大的选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆