I am using Ubuntu 20.04 desktop. I have only the default themes installed on my system. Currently, I am using Adwaita (default) which does not have arrows at the two ends of vertical or horizontal window scrollbars.

I have tested the other themes; only HighContrast and HighContrastInverse seem to provide the arrows I need. However, these themes are not appropriate for me. Adwaita (default) is just fine, except for the missing arrows in scrollbars.

I have tried a few solutions provided on the Internet (like https://www.slsmk.com/adding-scrollbars-and-buttons-to-desktop-theme/ ) that try to create a file like ~/.config/gtk-3.0/gtk.css and put the necessary CSS declarations, but these do not work.

What is the recommended method to locally modify a theme for GTK2 applications and add these scrollbar arrows?


Actually, it turns out that the above-mentioned action does work for GTK3 applications. But, my application that needs these arrows uses GTK2.

I tried locations like ~/.config/gtk-2.0/gtkrc, ~/.gtkrc, and ~/.gtkrc-2.0, but it didn't help.

Editing directly the file /usr/share/themes/Adwaita/gtk-2.0/main.rc and commenting out the lines:

GtkScrollbar::has-backward-stepper = 0
GtkScrollbar::has-forward-stepper = 0

seems to help, but I want to do it on user basis (by settings their values to 1).

  • This is just from memory, but maybe you could add some code to ~/.gtkrc-2.0?
    – DK Bose
    May 11 '20 at 1:12
  • Which are these gtk2 applications, preferably small ones?
    – DK Bose
    May 25 '20 at 12:32
  • Lazarus (FreePascal) applications. See: wiki.freepascal.org/GTK3_Interface
    – FedKad
    May 25 '20 at 12:42
  • I used apt rdepends libgtk2.0-0 | less to find a few. A convenient one to check with (for me) is pcmanfm.
    – DK Bose
    May 25 '20 at 12:46
  • You linked to a GTK3 application?
    – DK Bose
    May 25 '20 at 12:47

Your Answer

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

Browse other questions tagged or ask your own question.