eclipse - Ubuntu 上 Eclipse Pane 中的非常大的选项卡

标签 eclipse ubuntu user-interface gtk

我的问题与 Stack Overflow 问题非常相似 Gigantic Tabs in Eclipse on Ubuntu .

我已经尝试了所提供的解决方案,但它们似乎已经过时了。我找到了 a solution很好地处理工具栏和菜单,但不是减少 Pane 内不成比例的大选项卡(和标签)的大小和填充的解决方案(请参阅下面屏幕中的选项卡“Package Explorer”)。

我对我的操作系统范围内的 GTK 主题的自定义方式很满意,不想改变它。是否有快速修复来减小 Eclipse 中 Pane 的选项卡大小?

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

这里是我正在使用的特定于 eclipse 的 GTK 样式:

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"

这是我的 IDE 的屏幕截图,带有巨大的选项卡:

Eclipse Juno IDE with tabs too big

最佳答案

您可以编辑 Eclipse 的 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(对我来说效果很好)

这应该可以解决问题。

关于eclipse - Ubuntu 上 Eclipse Pane 中的非常大的选项卡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11805784/

相关文章:

linux - 如何使服务不需要 super 用户密码输入?

Ubuntu Jupyterhub : 500 POST Spawner failed to start [status=1]

jQuery UI - 可拖放的数据传输未定义

android - 出现 SWT 错误

python - OSError : [Errno 36] File name too long: for python package and . txt 文件, Pandas 打开

java Canvas 抽绳

java - 关闭窗口 - 但不停止程序 - JAVA

android - 有没有人在 64 位 Windows 7 上成功使用 64 位 Eclipse for Android 2.3 dev?

java - CheckStyle Eclipse 插件无法正确显示标签

java - GWT 2.5。 Eclipse插件