Extra Large Tabs in Eclipse Panels on Ubuntu

My question is very similar to the Gigantic Tabs stack overflow in Eclipse on Ubuntu .

I tried the solutions presented, but they seem to be old. I found a solution that perfectly handles the toolbar and menu, but not a solution that reduces the size and filling of disproportionately large tabs (and label) in the panels (see the "Package Explorer" tab on the screen below).

I am pleased with how my GTK OS theme is configured and do not want to change it. Is there a quick fix to reduce panel tab sizes in Eclipse?

I am using Eclipse for Mobile Developers (Juno) on Ubuntu 12.04. I also mentioned that I really like the way Eclipse comes out of the box in Windows 7, so something like this would be ideal.

Here are the GTK styles that I use in eclipse:

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 with huge tabs looks like:

Eclipse Juno IDE with tabs too big

+69
eclipse user-interface ubuntu gtk
Aug 04 2018-12-12T00:
source share
7 answers

You can edit Eclipse 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 is * because I assume that the version may change in the future or may be different). There is a CSS class in this file:

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

And you have two possible solutions:

  • change font-size to something smaller
  • just comment out or remove font-size from this class (works fine for me)

And that should do the trick.

+96
Aug 6 '12 at 18:17
source share

Tab style can be changed in Eclipse 4.2 by editing CSS. You can change styles directly in the Eclipse preferences window after installing the E4 CSS editor plugin.

Go to Help> Install New Software, then install the E4 CSS editor (Incubation) plugin using the Eclipse 4 update site (add this link: http://download.eclipse.org/e4/updates/0.12 ) .

After rebooting, go to Window> Preferences, General> Appearance and now you can edit the styles here for any selected theme.

I use this style for tabs:

 .MPartStack { font-size: 9; font-family: Liberation Sans; swt-tab-renderer: null; swt-tab-height: 22px; swt-selected-tabs-background: #FFFFFF #ECE9D8 100%; swt-simple: false; swt-mru-visible: false; } 

You can specify the tab height using the swt-tab-height option. This value sets the height of the tabs, ignoring the font size.

+61
Nov 23 '12 at 23:23
source share

I also wanted to reduce especially horizontal space to fit more tabs, because Eclipse lacks tabs across multiple lines.

These instructions will be available for any platform (not limited to, for example, Ubuntu / GTK).

What I've done:

  • Font size reduced
  • Font changed to something horizontally compact
  • X button removed (close tab)

... gives the following result on my system (Win 7):

Screenshot with modified tabs

... and this is how it is done:

  • Check which CSS layout you are using: Preferences-> General-> Appearance-> check the value of the "Subject:" list

  • Open the corresponding file in <eclipse folder>\plugins\org.eclipse.platform_<your version>\css , for example. e4_default_win7.css

  • Change the .MPartStack entries to set the font size and font, for example:

     .MPartStack { font-size: 8; font-family: 'Arial Narrow'; swt-simple: true; swt-mru-visible: false; } 
  • Add the following entry to remove the X icon (close):

     CTabItem { swt-show-close: false !important; } 

What is it!

+13
Nov 22 '13 at 13:06 on
source share

Eclipse is now (4.5 Mars) by default for GTK3 on Linux. For 4.6, the fix seems to have merged into alredy.

Changing the environment variable SWT_GTK3 for Eclipse Mars:

 $ export SWT_GTK3=0 

or set this inline variable with eclipse running

 $ SWT_GTK3=0 /path/to/eclipse/eclipse 

To kill it, just drop it in the root like eclipse.sh:

 #!/bin/bash SWT_GTK3=0 exec env "${0%.sh}" 
+8
Aug 26 '15 at 14:46
source share

You can try the theme from https://github.com/jeeeyul/eclipse-themes .

After installing this theme, apply it by selecting the theme under Window> Preferences> General> Appearance> Jeeeyul.

And to solve the problem with a large tab, refer to https://github.com/jeeeyul/eclipse-themes/wiki/Linux-Huge-Toolbar-Problem .

It is easy and beautiful. Enjoy it!

+1
Nov 25 '14 at 5:08
source share

An alternative way is to choose:

 System settings > Universal access > Text size as small. 
0
Oct 20 '13 at 12:55
source share

Here you can edit all the small details about the size of the tabs:

image

0
Feb 04 '16 at 19:30
source share



All Articles