Reputation: 10529
When running a fresh install of a recent Eclipse on a fresh install of a recent Ubuntu, you'll see this:
For reference, this much more compact view is what I'm used to look at on a Windows machine:
There's several related questions and answers for older versions of Eclipse, falling into two categories:
"Apply a design fix on GTK2 level. If your Eclipse uses GTK3, force it to use GTK2 instead."
"Apply a design fix with CSS."
Now, in my experience with Eclipse 4.11 aka "2019-03"...
./eclipse --launcher.GTK_version 2
I get:The Eclipse (...) launcher no longer supports running with GTK + 2.x. Continuing using GTK+ 3.x.
plugins/org.eclipse.ui.themes.../css/e4_default_gtk.css
don't have any effect. I tried to edit this file a lot but it just never seems to do anything.So my question is what do I have to do to get rid of these space wasters? And more generally, what's the designated way to tweak design parameters with new versions of Eclipse? There's also word of a CSS editor plugin for Eclipse itself, but it seems to be abandoned.
I'll be collecting links to other questions dealing with related Eclipse GUI problems:
❶ According to this thread, GTK2 support has been dropped with Eclipse 4.10 aka "2018-12".
Upvotes: 3
Views: 1034
Reputation: 1
I recently had the same problem.
When I used eclipse 2020-03 on Ubuntu 16.04 I didn't notice any problems, but yesterday I switched to Ubuntu 20.04, and I faced the problem of big spacing in tree views - It just doesn't let you work.
I exclude problems with eclipse since I used the same installation. This lead me to GTK. Ubuntu 16.04 uses the GTK version before 3.20, and 18.04 and 20.04 use versions after 3.20 which contain some changes related to CSS.
I found that in /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css
is parameter set -GtkTreeView-vertical-separator: 0;
, but in /usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css
there is no such parameters.
Adding below parameters in /usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css
resolved my problem:
treeview {
-GtkTreeView-vertical-separator: 0px;
-GtkTreeView-horizontal-separator: 0px;
-GtkTreeView-expander-size: 16;
}
Note: I am not sure if it helps if Eclipse is instaled via snap
, since in /snap
folder I also found some theme files.
Upvotes: 0
Reputation: 106
Aahhh welcome to the world of pain: Linux and themes. This will be a long answer to fight a lot of outdated information that I found on the net.
What does not work (anymore) and why:
How to actually reduce the tab and icon padding:
env GTK_THEME=Clearlooks-Phenix /opt/eclipse/eclipse
Example themes resulting in a compact eclipse look:
Usual themes that will make almost everything look good except eclipse:
Upvotes: 2