Reducing size of toolbar is possible. I wrote following CSS file (taking help from google) to modify Toolbar size:
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
}
style "compact-default"
{
xthickness=1
ythickness=1
}
style "compact-entry"
{
xthickness=2
ythickness=2
}
class "GtkButton" style "compact-default"
class "GtkPaned" style "compact-default"
class "GtkEntry" style "compact-entry"
class "GtkToolbar" style "compact-toolbar"
widget_class "*<GtkToolbar>*<GtkButton>" style "compact-button"
In this CSS the line class "GtkEntry" style "compact-entry"
reduces the size of toolbar as per CSS style "compact-entry"
.
I saved above file by giving name as .gtkrc-eclipse
in home directory. After that I wrote script eclipse.sh
containing following command to run eclipse with file that we created.
export SWT_GTK3=0
env GTK2_RC_FILES=/usr/share/themes/Adwaita/gtk-2.0/gtkrc:/home/snoop/.gtkrc-eclipse /home/snoop/Mars2/eclipse
Now, calling script using bash eclipse.sh
runs eclipse with our CSS style.
And modified Eclipse toolbar looks like this:
