Skip to content

Linux Huge Toolbar Problem

renataogarcia edited this page Jul 23, 2015 · 8 revisions

Eclipse 4 on Linux GTK can look terrible. Main reason is to Huge widget size. The solution below depends on the GTK version you are using. Eclipse Mars uses GTK 3 by default when installed in your system, previous versions use GTK 2. Also if you are using Linux Mint, you will see horrible background of Toolbars.

GTK 2 - Easy Fix

You can fix it by defining gtk 2.0 layout.

After installation of Jeeeyul's Eclipse Themes, You can find Launch GTK 2.0 RC Wizard from toolbar menu.

Linux Menu

This menu will shows a wizard that will download GTK 2.0 Runtime Configuration and ask restart eclipse. Then choose a preset that you want to re-compute minimum tab height.

Result

GTK Compact

Undoing

What if you want to revert GTK configuration, Just remove ~/gtkrc-2.0 file.

$ rm ~/.gtkrc-2.0

GTK 3

You'll need to add the bit below to your GTK3 theme files. They can usually by found under /usr/share/themes or ~/.themes. The actual file depends on your theme, but most of them have a gtk-3.0/gtk-widgets.css.

The minimum Tab height is calculated based on this SWT component, so you can tweak it's CSS selector below to adjust it. For most of the themes just removing the padding should do the trick:

GtkToolbar#swt-toolbar-flat {
    padding: 0px;
}

Feedback

I am not good at linux and GTK. If you have better example or explanation. Please update this document. What if you defined better .gtkrc-2.0 then please make a pull request.

Clone this wiki locally