snork.ca ... making kittens cry since 2001

Fixing GTK3 Scrollbars 2019-03-06


I have been mostly using Debian Jessie and Ubuntu Xenial when setting up desktops lately, both of which are a little older and the GTK+ applications in their repositories are typically GTK+2. I also like to use a very basic desktop environment with just openbox and a few parts of the xfce4 environment. It is very light and it "runs applications", that's all I need a DE to do. Since everyone and their dog seem to think that higher numbers are better I figured I'd try out Buster and see what the fuss is about. The problem is, many of the applications I use are GTK+3 in Buster, and the scrollbars in GTK+3 are just plain crap. Have a look at these two images (click for full size)... the picture on the left shows what scrollbars should look like, and the picture on the right shows the thin weak disappearing garbage that GTK+3 uses by default.

1stretch_th Scrollbars in Stretch
2buster_thScrollbars in Buster

What's worse is that they made it a heinous pain in the ass to switch back to regular scrollbars. With a little help from someone on Snoonet IRC I was able to eventually get my scrollbars to suck less. They're not perfect, but they will probably do the job. Basically I needed to create and/or modify five files to just configure scrollbars. Thanks GTK+ developers. Anyways, here are the problems that need to be fixed, and how to fix them:

The .gtkrc-2.0 file is a basic theme setup that was actually made with lxappearance. The gtkrc and gtk.css files are the ones I got some help with on IRC. They basically define the style of the scrollbars. My settings.ini file was also made by lxappearance and the last line is the one that makes the scrollbars stop warping to the place you click (instead they just scroll one page at a time). Finally the environment file is used to make the the scrollbars show even when the window is not currently being scrolled and the mouse is not hovering over it. Rather than screwing with this stuff manually I figured I'd make a script that I can use to quickly fix my scrollbars on new installations. You're welcome to use it, just be aware that it overwrites your existing theme configuration eh. Now... isn't that better?

3buster_fixed Buster's repaired scrollbars

To be honest, I don't think the buttons at the ends of the scrollbars are quite right, so if anyone knows how to modify the colours of the arrows on the buttons or how to make the arrows appear when the window content is not long enough to activate the scrollbar, I'd love to hear about it.

Made using Notepad++ & FastStone. Hosted on Devuan with nginx & php. Powered by North Korean mushrooms.