How to fix GTK3 scrollbar behavior

I have removed the overlay scrollbars.

How can I configure GTK3 scrollbar clicking behavior?

GTK3 applications scrollbars behave strangely under Ubuntu 12.10 and 13.04. This also happens with Fedora 17 and 18.

When I left-click anywhere above or below the thumb, it jumps to that position and starts dragging from there. The expected behavior is to scroll one page up or down.

When I right-click anywhere above or below the thumb, it scrolls one page up or down. That is the behavior I expect from left-clicking, the same way it works on GTK2 and QT applications.

Horizontal scrollbars have the same problem.

This is very bad for consistency.

2

4 Answers

Found the answer here:

Edit (or create) the file:

~/.config/gtk-3.0/settings.ini

And add the following:

[Settings]
gtk-primary-button-warps-slider = false
9

For GTK2 applications, I also noticed the scrollbar-warp behavior happens with the Adwaita theme (but not with the Greybird theme). I fixed it for GTK2 by editing /usr/share/themes/Adwaita/gtk-2.0/gtkrc and changing the line

gtk-primary-button-warps-slider = 1

to

gtk-primary-button-warps-slider = 0
1

The behavior appears tied to the desktop theme/style you select. If you install the gtk2-engines-xfce package and then select one of the GTK2 themes (e.g. Xfce-4.0) from the Appearance settings, you will get GTK2-style scroll bars.

Unless you are particularly interested in using Adwaita or Greybird, I think the best (and certainly easiest) solution is just to pick a different theme.

Reverting to the Gtk2 scrollbar behavior can also be done on a per-theme basis by creating/including in the ~/.themes/myThemeName/gtk-3.0/settings.ini file, the [Settings] section, the scrollbar behavior switch

[Settings]
gtk-primary-button-warps-slider = false
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like