-
-
Save andrioli/3825078 to your computer and use it in GitHub Desktop.
# 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" |
Thanks a lot! (my setup: Eclipse 4.5.2 / Archlinux + Cinnamon). Is this bug already reported?
Good work. Thanks a lot. Tested on Debian Jessie
Thanks!
You make my monkey developer day better.
Very nice! Worked on ubuntu 14.04
Truly appreciated..
I'm using the Eclipse Neon 4.6 (Ubuntu 16.04) and that script made my day 👍
Cool! Tried out on Eclipse Oxygen on Ubuntu Mate 16.10 beta2.
Thanks for the tip.
THX!!!
It works even on Oxygen GTK+ 2!
Just ignore the MPartStack bits (There aren't on .css file for Oxygen).
Thank you very much!!!
If you do wish to modify font-size
under Eclipse Oxygen, this style has been refactored into e4_basestyle.css
in this release.
Actually, for Oxygen we just need to force GTK 2 on Ubuntu 17.10.
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)
Awesome ! Still an issue these days under Eclipse 4.5.2 / Archlinux + Cinnamon.