Ubuntu – Question about GtkScrollbar class in custom themes

gtk3scrollingthemes

I very much like to use the Zukitwo theme as an alternative over the standard Ambiance theme, it is to my taste more easy on the eyes.

However, the theme takes away the scrollbar arrows or "steppers" (which are normally part of the scrollbars in e.g. thunderbird and firefox in the Ambiance theme).

I found this information:
https://live.gnome.org/GnomeArt/Tutorials/GtkThemes/GtkScrollbar
and was looking around in the gtk stylesheets of the theme:

/usr/share/themes/Zukitwo-Dark/gtk-3.0/gtk-widgets.css

but I have no experience at all in editing themes to get the arrows back in place again. I was trying to put in there the "GtkScrollbar-has-forward-stepper" and "GtkScrollbar-has-backward-stepper" commands set to "1", but with no effect after reboot.

Could someone perhaps point out to me what tweaks to make to reinstate the scrollbar arrows? I would be happy to learn more about this!

All help is much appreciated!

Best Answer

I actually managed to solve my question myself. I will explain here how for those who are interested:

In the folder /usr/share/themes/Zukitwo-Dark/gtk-3.0 edit as root the file gtk-widgets.css. Under /default/ include both lines

-GtkScrollbar-has-forward-stepper: 1;

-GtkScrollbar-has-backward-stepper: 1;

Make sure that the "stepper-size" is set to 13 (not 0)

-GtkRange-stepper-size: 13;

Include the same two lines in the part where is says

.scrollbar {

and also check the stepper-size. Then in the folder /usr/share/themes/Zukitwo-Dark/gtk-2.0 adjust the file "gtkrc": In the Scrollbar part, add

GtkScrollbar    ::has-backward-stepper      = 1

GtkScrollbar    ::has-forward-stepper       = 1

and again check the range:

GtkRange    ::stepper-size          = 13

This should take care of it all and the steppers (arrows) should be back after a logout/login.