Buttons on GTK3 scrollbars

Published: 2018-04-15

Figure 1: before (left) and after (right) screenshots of a scrollable item in gtk3-widget-factory

In the default Adwaita theme of GTK3, the scrollbars are Apple-esque blobs lacking any up/down buttons. Also, the scrollbars implement some sort of "auto-hide" behavior that hides them when the cursor is far away.

These have been long standing minor annoyances of mine. Let's fix them!

Disable scrollbar auto-hide To disable the "auto-hide" feature of GTK3 scrollbars, add the following environment variable to your .profile , .bash_profile , or wherever you put your customized environment variables. export GTK_OVERLAY_SCROLLING=0 Note: If you are running a display manager, consult your display manager's documentation. Some display managers source .profile ; some don't. Personally, I prefer to use startx to launch a graphical session, so .bash_profile is loaded when I login.

Add buttons to scrollbars One more thing is missing: the up and down buttons. Create the file ~/.config/gtk-3.0/gtk.css : * { -GtkScrollbar-has-backward-stepper: true; -GtkScrollbar-has-forward-stepper: true; /* -GtkScrollbar-has-secondary-backward-stepper: false; */ /* -GtkScrollbar-has-secondary-forward-stepper: false; */ } Uncomment and set the has-secondary-*-stepper properties if you desire to configure a scrollbar that has both up/down buttons on a single corner (e.g. old KDE style).

Apply the changes If you changed the GTK_OVERLAY_SCROLLING environment variable, log out and log back in so that the change takes effect globally. If you created or modified gtk.css , restart all GTK3 applications.

Conclusion It's hard to say anything about UI design without starting a flame war, so I will keep it simple: This is my workbench, dammit, it's not a pretty box to impress people with graphics and sounds. When I work at this system up to 12 hours a day, I'm profoundly uninterested in what user interface a novice user would prefer. – Erik Naggum, 1997-02-16