How can I make Eclipse to draw the tabs more likely the native ones?

7

2

I don't really like the Eclipse IDE, since I found Netbeans much more usable, but Android development strongly encourages to do so. What my main problem with Eclipse is, that it's really ugly. Which would be no big deal, but I have a small screen, and it's filled with unnecessary paddings for tabs, and such. It would be much more usable if I could somehow force Eclipse to look more native. I ask this, because there were similar questions for older versions of Netbeans, or for versions on specific platforms, and solutions existed.

By the way I'm using Eclipse 3.7.0 from the Ubuntu 11.10 repositories.

Thanks for efforts!

Tamás Barta

Posted 2012-03-11T16:28:44.987

Reputation: 443

Strange, I use Eclipse at least once a week and I have no idea what this question is asking. – surfasb – 2012-03-12T20:26:22.277

@surfasb I think Barta is referring to the shape of the tabs. Instead of being rectangles, they have sloped edges, similar to Google Chrome's tabs. – iglvzx – 2012-03-15T05:01:09.240

Yes, at first I thought that this is causing the loss of precious screen space, but I found a checkbox in the General/Appearance preferences to make it regular shaped, but that takes exactly the same space. Still, compared to NetBeans, or Firefox, or any application that uses tabs, Eclipse's tabs have much bigger paddings. :( – Tamás Barta – 2012-03-17T21:49:25.363

Answers

3

Recently I came across gtkrc files, and I found articles that use gtkrc files to tailor Eclipse's look for different reasons, and these includes tooltip colours, and making tabs compact. And that's what I really wanted. So I found this article, where the main article makes tabs compact, and the first comment shows how to make tooltips readable with the same approach.

First, you have to create a gtkrc somewhere on your computer containing something similar:

gtk-color-scheme = "selected_text_color:#000000"
style "compact"
{
  GtkButton::default_border={0,0,0,0}
  GtkButton::default_outside_border={0,0,0,0}
  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"
  text[SELECTED] = @selected_text_color
}
class "GtkWidget" style "compact"
style "compact2"
{
  xthickness=1
  ythickness=1
}
class "GtkButton" style "compact2"
class "GtkToolbar" style "compact2"
class "GtkPaned" style "compact2" 

They also complain about fonts, so this gtkrc changes fonts as well, which I removed, since I reduced font size in Gnome settings, and I was satisfied with that.

The first comment tells to append this to this gtkrc to make tooltips readable:

style "gnome-color-chooser-tooltips"
{
bg[NORMAL] = "#FFFFAF"
fg[NORMAL] = "#000000"
}
widget "gtk-tooltip*" style "gnome-color-chooser-tooltips"

After you saved the gtkrc, you have to make Eclipse run with the GTK2_RC_FILES environment variable containing the path to your gtkrc file. I achieved this by altering the /usr/share/applications/eclipse.desktop file to run eclipse.sh instead of eclipse, and I created eclipse.sh with the following content:

#!/bin/bash
export LIBOVERLAY_SCROLLBAR=0 # This disables overlay scrollbars, its my preference
export GTK2_RC_FILES=$GTK2_RC_FILES:/home/tamas/eclipse.gtkrc # This sets gtkrc file
eclipse

This made Eclipse almost perfect. I hope others will find it useful as well.

Tamás Barta

Posted 2012-03-11T16:28:44.987

Reputation: 443

1

I use a plugin called "Extended VS Presentation". It's not exactly native, but there's less padding. There may be other appearance plugins that you could try, but that's the only one I've used.

Note that after you install it, you need to enable it in Window->Preferences->General->Appearance (change the "Current Presentation" to "Extended VS Presentation" and restart Eclipse).

Sam Hartsfield

Posted 2012-03-11T16:28:44.987

Reputation: 121

Thanks for your answer! I wanted to give it a try, but when following the instructions on the page you linked to, Eclipse stops installing that plugin saying:

"An error occurred while collecting items to be installed session context was:(profile=PlatformProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). No repository found containing: org.eclipse.update.feature,EclipseSkins,1.5.6.201008292220 No repository found containing: osgi.bundle,de.loskutov.eclipseskins.extvs,1.5.6.201008292220" – Tamás Barta – 2012-03-17T21:48:08.890

Sorry you had trouble installing. I just tried it on Windows and it was working. Make sure to select "Extended VS Presentation" from under "Eclipse 3.5 - 3.7". The "Contact all update sites" option was selected. But my main suggestion would be to uninstall Eclipse from the Ubuntu repository and install (just extract, really) it from the tar.gz from www.eclipse.org instead; that's what I've always done on Linux. If it still doesn't work, I'll give it a try myself on Linux. – Sam Hartsfield – 2012-03-19T00:43:50.713

It seems, that there has been no other solutions, so I accept you answer, since it works with the non-repository Eclipse. Thanks! – Tamás Barta – 2012-04-26T18:00:44.577