1

I am on Debian Buster, Mate Desktop theme Menta, OpenJdk 11.0.9.1, eclipse 2020-06.

My scroll bar sliders in eclipse are huge.

enter image description here

I tried resizing them by a custom gtk-3 css file but this did only change the bar itself but not the buttons. gedit does apply the css settings. See bewlo:

enter image description here

It does not matter if theming in eclipse is on or off (I restarted) or the used eclipse theme.

I read about the setting and tried changing -Dswt.enable.themedScrollBar=false / true in eclipse.ini, didn't change a thing.

gtk-3 css

The ~/.config/gtk-3.0/gtk.css I tried. Pretty much the default values from GTKTheme

    scrollbar slider {
      /* Size of the slider */
      min-width: 6px;
      min-height: 6px;
      border-radius: 6px;
      -GtkRange-slider-width: 6;
      -GtkRange-stepper-size: 6;
      -GtkRange-stepper-spacing: 0;
      -GtkRange-trough-border: 1;
      -GtkRange-arrow-displacement-x: 0;
      -GtkRange-arrow-displacement-y: 0;
      -GtkRange-activate-slider: FALSE;
      -GtkRange-trough-side-detrails: FALSE;
    }

gtk-2 gtkrc

I tried setting ~/.config/gtk-2.0/gtkrc

    style "scroll"
    {
     GtkScrollbar::slider-width = 6
    }
    class "*" style "scroll"

Side note: It looks even worse using the dark eclipse theme as the slider colour does not change.

3
1

The problem seems to exist only with the stepper buttons which are not really required in my case. They can be disabled and the bar looks okay.

See some unresolved gtk bug report that might be related: Unresolved Gtk stepper button width bug

The following comment made me think about disabling the buttons:

Still an issue for GTK2. But less of one for GTK3 since high contrast and adwaita don't use stepper buttons by default. However, if you have a theme with steppers this is still present in 3.

GtkTheme Reference about disabling the stepper buttons: GtkTheming

This gives me a smaller bar. The colour could be changed as well I guess.

/* Disable steppers as the width is not conforming to the slider width and looks strange in apps like eclipse (SWT) */
scrollbar {
  -GtkScrollbar-has-backward-stepper: 0;
  -GtkScrollbar-has-forward-stepper: 0;
}

scrollbar slider {
  /* Size of the slider */
  min-width: 6px;
  min-height: 6px;
  border-radius: 6px;
  -GtkRange-slider-width: 6;
  -GtkRange-stepper-size: 6;
  -GtkRange-stepper-spacing: 0;
  -GtkRange-trough-border: 1;
  -GtkRange-arrow-displacement-x: 0;
  -GtkRange-arrow-displacement-y: 0;
}

Sliders smaller

2
  • 1
    Nice find! And thanks for taking the time to post your solution :) – terdon Jan 7 at 11:57
  • Thanks for being the rubber duck ;-) – Benjamin Peter Jan 7 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.