-
Notifications
You must be signed in to change notification settings - Fork 121
Linux Huge Toolbar Problem
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.
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.
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.
What if you want to revert GTK configuration, Just remove ~/gtkrc-2.0
file.
$ rm ~/.gtkrc-2.0
You'll need to customize your GTK3 theme. A general way to override current theme style is to add/edit ~/.config/gtk-3.0/gtk.css
. You can also directly edit your theme files, which can usually be 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;
}
Note: in newer versions of Eclipse (probably since 4.6) the #swt-toolbar-flat
selector is no longer valid. You can try without it, but then it will affect all the other GTK apps as well (an idea to explore: use $XDG_CONFIG_HOME
variable in eclipse startup script to load custom gtk.css
from a folder made specifically for Eclipse).
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.