User avatar
Posts: 93
Joined: Fri Jun 17, 2022 11:25 am

Scrollbars permanently visible

Fri Aug 26, 2022 9:43 am

Hi Folks,

On bullseye the file explorer scrollbars fade in and out as required. Mostly this is cool, but for some users it would help to keep them visible all the time. Anyone know how to do this please?

User avatar
Posts: 3531
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Scrollbars permanently visible

Sat Oct 15, 2022 8:54 pm

Friese wrote:
Sat Oct 15, 2022 10:38 am
Make sure overflow is set to "scroll" not "auto." With that said, in OS X Lion, overflow set to "scroll" behaves more like auto in that scrollbars will still only show when being used.
The auto-hiding nature of gtk-3's scrollbars aren't affected by changes to a theme's CSS, it's an annoying a misused feature of gtk-3 that isn't editable in a theme's .css file (I don't think). It's normally up to the individual programs to request whether overlay (auto-hiding) or non-overlay (non-auto-hiding) scrollbars are used are when creating scrolledWindow.widgets.

Looking at the source code for scrolledWindow the auto-hiding overlay method seems to only be a default when there is no mouse (e.g. touchscreen only), a program can always request the use of overlays which I assume the file manager (pcmanfm) is doing.

You can tell gtk-3 to not use overlay scrollbars via setting an environment variable (set it in your .profile so every program gets the setting, including the file manager). This should revert gtk-3 to having the scrollbars that don't auto-hide when you stop moving the pointer. I'm not sure if this actually disables the use of overlays outright or sets the default behaviour, whichever it is Using this environment variable disables the use of overlay scrollbars, it's what I've used for quite a while with no problems. Obviously this won't be able to affect any programs that don't use gtk-3, but a lot do.

Add this line to the end of the file ~/.profile with your text editor of choice and reboot.

Code: Select all

Edit #2:
I've found the gtk-3 setting to disable the overlay scrollbars without having to use the environment variable above (though that is the ultimate way to disable it as it overrides any other setting). It can be put in the theme's gtk-3.0/setting.ini file, though you're better off creating your own personal settings file which will override the theme's incase the theme gets updated. The PiX (and PiXflat) have identical settings.ini files at the time of writing consisting of just one setting so to copy it and add the new line do :-

Code: Select all

mkdir -p ${XDG_CONFIG_HOME}/gtk-3.0
cp /usr/share/themes/PiX/gtk-3.0/settings.ini ${XDG_CONFIG_HOME}/gtk-3.0/
echo "gtk-overlay-scrolling = false" >> ${XDG_CONFIG_HOME}/gtk-3.0/settings.ini
She who travels light — forgot something.
Please note that my name doesn't start with the @ character so can people please stop writing it as if it does!

Return to “Assistive technology and accessibility”