Overlay scrollbars¶
Overlay scrollbars are scrollbars which are hidden when not in use. When the user moves the mouse pointer, a very narrow scrollbar knob is shown, and if the user moves the pointer to the location of the scrollbar, the knob will widen and the user will be able to use it.
Get the user’s preference¶
Toolkits and applications should read the XDG setting org.gnome.desktop.interface overlay-scrolling
.
Supported toolkits¶
Toolkit |
Support |
Default behavior |
Notes |
---|---|---|---|
Gtk2 |
No |
Off |
|
Gtk3 |
Yes |
On |
|
Gtk4 |
Yes |
On |
|
Qt Widgets |
No |
Off |
|
Qt Quick Controls |
Yes |
Off |
Not user-configurable |
Mozilla |
Yes |
On |
|
Chromium |
Yes |
Off |
Configuring¶
Gtk¶
It is controlled by the Gtk setting gtk-overlay-scrolling
.
To configure this:
Set XDG setting
org.gnome.desktop.interface overlay-scrolling
Set GSetting/dconf setting
org.gnome.desktop.interface overlay-scrolling
Set
gtk-overlay-scrolling
in the Gtksettings.ini
Even though Gtk3 does not support setting this setting via GSettings, setting it via GSettings seems to work after restarting the Gtk3 apps.
This setting cannot be set via XSettings.
Overlay scrolling is not supported in Gtk2.
Notes¶
The Gtk developers do not intend for this to be user-configurable:
What we will not add is a user-accessible toggle, or an environment variable. This is an application developer decision, not a toolkit setting. If the application developer wants to provide an application-specific setting and wire it to the GtkScrolledWindow API, it’s entirely in their capacity to do so.
However, the Gtk developers may have changed their mind, as this is now exposed as an accessibility setting in GNOME (see bug gnome-control-center#1701).
Firefox and Mozilla derivatives¶
The user should set widget.gtk.overlay-scrollbars.enabled
in about:config
.
Chromium, Chromium derivatives, and Electron applications¶
This is supposed to work, but it appears that Chromium is stuck without overlay scrollbars at least on Chromium 143.
This can be configured by using the --enable-features
command-line flag, or by accessing chrome://flags
.
chromium --enable-features=OverlayScrollbar
The FluentScrollbar
and FluentOverlayScrollbar
features allow enabling the redesign of the scrollbar to match Microsoft’s Fluent design (see the visual spec, technical design doc, and Chromium bug).
Google appears to intend to check org.gnome.desktop.interface overlay-scrolling
in a future release.