Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Config to make Eclipse Juno icons and tabs look small and nice in Linux
# Create a new file in your home directory called .gtkrc-eclipse
# call eclipse with this command:
# Gtk2 forced:
# export SWT_GTK3=0
# env GTK2_RC_FILES=/usr/share/themes/<YourTheme>/gtk-2.0/gtkrc:/home/<YourUser>/.gtkrc-eclipse '/path_to_eclipse/eclipse'
# In your Eclipse directory find the file 'e4_default_gtk.css'
# In this file there's a CSS class:
# .MPartStack {
# font-size: 11;
# swt-simple: false;
# swt-mru-visible: false;
# }
# And you have two possible solutions:
# 1. Change font-size to something smaller
# 2. Just comment out or remove font-size from this class (works well for me)
# http://stackoverflow.com/questions/11805784/very-large-tabs-in-eclipse-panes-on-ubuntu
# .gtkrc-eclipse
style "gtkcompact" {
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=0
GtkMenuItem::horizontal_padding=4
GtkToolbar::internal-padding=0
GtkToolbar::space-size=0
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
GtkTreeView::vertical-separator=0
GtkTreeView::horizontal-separator=0
GtkTreeView::fixed-height-mode=TRUE
GtkWidget::focus_padding=0
}
class "GtkWidget" style "gtkcompact"
# Make tabs smaller
style "compact-toolbar" {
GtkToolbar::internal-padding = 0
xthickness = 1
ythickness = 1
}
style "compact-button" {
xthickness = 0
ythickness = 0
}
class "GtkToolbar" style "compact-toolbar"
widget_class "*<GtkToolbar>*<GtkButton>" style "compact-button"
@ClickerMonkey

This comment has been minimized.

Copy link

ClickerMonkey commented Jul 27, 2013

I can't express how thankful I am for this, THANKS MAN!

@capitanh

This comment has been minimized.

Copy link

capitanh commented Jun 10, 2014

Great job!! Which parameter should be modified to get menu items ("File", "Edit", etc) a little bit more separated? All of them are too close to one another, it looks like a long phrase and not individual words...

@truhlikfredy

This comment has been minimized.

Copy link

truhlikfredy commented Oct 5, 2014

Love your changes, tested on Kepler version and it looks so much better, had previous rc file just to change default fonts:

style "eclipse" {
font_name = "Sans Condensed 8"
}
class "GtkWidget" style "eclipse"

And with yours together is so pleasant to look at :) now if I work on 1920x1200 or 1280x720 it feels very usable and non-claustrophobic. Before I felt under pressure when moving with work from desktop to laptop.

@w39hh

This comment has been minimized.

Copy link

w39hh commented Feb 10, 2015

Using this on Luna (4.4.1), works great, thanks so much. I wish this was the default.

@andrioli

This comment has been minimized.

Copy link
Owner Author

andrioli commented Sep 18, 2015

@leslau Thanks, I'm back to Ubuntu today and looking how force GTK2 found your fork 👍

@dieegorenan

This comment has been minimized.

Copy link

dieegorenan commented Nov 4, 2015

Thank you so much! Work on Eclipse Mars as well

@avnshpnwar

This comment has been minimized.

Copy link

avnshpnwar commented Jan 13, 2016

Thanks a Lot !! :) Just tested it on Mars and Mint 17.3. Works perfectly

@biswajit2k4

This comment has been minimized.

Copy link

biswajit2k4 commented Mar 16, 2016

Hi, Is there a way to make small toolbar icon to standard size. I am running Eclipse on Windows 10 laptop having 3200 * 1800 resolution.
eclipse

@alessandroasac

This comment has been minimized.

Copy link

alessandroasac commented Mar 22, 2016

Thanks a Lot !!

@SR-G

This comment has been minimized.

Copy link

SR-G commented May 1, 2016

Awesome ! Still an issue these days under Eclipse 4.5.2 / Archlinux + Cinnamon.

@Hagbard1980

This comment has been minimized.

Copy link

Hagbard1980 commented May 12, 2016

Thanks a lot! (my setup: Eclipse 4.5.2 / Archlinux + Cinnamon). Is this bug already reported?

@rohitvvv

This comment has been minimized.

Copy link

rohitvvv commented May 12, 2016

Good work. Thanks a lot. Tested on Debian Jessie

@gaguileraglb

This comment has been minimized.

Copy link

gaguileraglb commented May 20, 2016

Thanks!
You make my monkey developer day better.

@ghost

This comment has been minimized.

Copy link

ghost commented May 21, 2016

Very nice! Worked on ubuntu 14.04

@shawnbrito

This comment has been minimized.

Copy link

shawnbrito commented Aug 23, 2016

Truly appreciated..
I'm using the Eclipse Neon 4.6 (Ubuntu 16.04) and that script made my day 👍

@radimch

This comment has been minimized.

Copy link

radimch commented Sep 30, 2016

Cool! Tried out on Eclipse Oxygen on Ubuntu Mate 16.10 beta2.
Thanks for the tip.

@bihe

This comment has been minimized.

Copy link

bihe commented Oct 4, 2016

THX!!!
Linux Mint 18/Cinnamon with Eclipse neon.1

compact

@inpos

This comment has been minimized.

Copy link

inpos commented Feb 7, 2017

THX!!!

@vpinna80

This comment has been minimized.

Copy link

vpinna80 commented Jul 14, 2017

It works even on Oxygen GTK+ 2!
Just ignore the MPartStack bits (There aren't on .css file for Oxygen).
Thank you very much!!!

@javabrett

This comment has been minimized.

Copy link

javabrett commented Sep 21, 2017

If you do wish to modify font-size under Eclipse Oxygen, this style has been refactored into e4_basestyle.css in this release.

@azisaka

This comment has been minimized.

Copy link

azisaka commented Nov 29, 2017

Actually, for Oxygen we just need to force GTK 2 on Ubuntu 17.10.

@boris-so

This comment has been minimized.

Copy link

boris-so commented Apr 3, 2018

Works for DBeaver (it is eclipse-based) on Debian Stretch
(css file can be found in /usr/share/dbeaver/plugins/org.eclipse.ui.themes_1.2.1.v20170809-1435/css/e4_default_gtk.css)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.