Hidden GTK3 scrollbars

Posted by fitheach on Sun 27 August 2017

My continuing journey of discovery after upgrading to Debian Stretch has led me to the hidden vertical scroll-bars in some of the latest GTK3 apps. Presumably, the idea is that hiding the scrollbars gives the user more visible screen area for displaying content. Another possibility is that scrollbars are considered to be a visual distraction and should be hidden until needed. I haven't researched the motivation behind the change.

I must be a traditionalist as I prefer my scrollbars to be permanently visible. There is also a usability issue when content has two (or more) nested scrollbars as the first and second scrollbars interfere with each other when you hover over a shared area.

I discovered there is an straightforward way to turn-off this behaviour by setting a environment variable for all GTK3 apps. The easiest way to set this variable is to place it in your login shell configuration file, which for me is ~/.bashrc:

vim ~/.bashrc

# set GTK3 scrollbars to be shown at all times
export GTK_OVERLAY_SCROLLING=0

This setting will only take effect when you next login.

On a related topic I also discovered, by chance, how to achieve the old scrolling behaviour in the new GTK3 apps. The old behaviour: clicking in the empty area either side of the scrollbar thumb would result in you moving backward or forward by one screens-worth of content. If you were clicking above the thumb it would move backwards and below the thumb forwards.

The new GTK3 behaviour: clicking, for example, at a position just before the end of the empty scrollbar will take you to a position just before the end of the content. I quite like this new means of navigation as there are times you want to move to the beginning, middle or end of the content and this is an easy way to do it. However, I would still like to have access to the old behaviour too, and it turns out I can. Instead of left-clicking in the scrollbar area if you right-click it operates using the old behaviour. I like having the best of both worlds.


Related posts: