GTK3: Changing the overlay/momentium scroll bar

For the overlay scrolling, you can turn that off by adding this to ~/.bash_aliases (local) and /etc/environment (system-wide and root):

export GTK_OVERLAY_SCROLLING=0

That is... until GTK4 where this environment variable is gone. It'll then be up to the developer to expose an option in their application, if they want. :man_facepalming:

Reference: GTK - ArchWiki


I also noticed the scrolling behaviour feels more clunky in GTK3:

GTK3 - default in Ubuntu MATE
weird-scroll

:point_up: This also shows a glimpse of when the scroll bar doesn't always scroll when dragging it - I vaguely remember hearing this mentioned in the community before. Anyhoo, that behaviour can be changed in the theme:

/usr/share/themes/Ambiant-MATE/gtk-3.0/settings.ini

[Settings]
gtk-primary-button-warps-slider = true

So it works like this:

old-scroll

Like it did in 16.04 GTK2 - root apps only (?)

gtk2

Reference: GTK - ArchWiki

I'm a bit confused at the default. I think the "warp" is the defacto GTK way (which I actually prefer) but Ambiant-MATE's default turns warping off. Only in 16.04 did it "warp" for root apps.

Turning off the warp for a moment, I wonder if we can adjust the scrolling timings - they are actually much slower then before.

GTK2 16.04 (left) - GTK3 19.04 (right)
wait-gtk2 wait-gtk3

:point_up: Both of these are scrolling a Pluma text file of 150 blank lines


If you change any of the GTK settings above, you'll need to re-apply the theme or log out/in for it to take effect.

6 Likes