What’s up with the scrollbar?

First, it was Ubuntu which innovated in the scrollbars creating a nice overlay, but making them unusable for those like me using a track pointer or a mouse without wheel.

Now, with GTK-3.0, the scrollbars have also changed their default behavior and when clicking above or below, the scrollbar moves immediately to that position.

Again, this makes it unusable unless you have a wheel in your mouse or have another fancy way of scrolling, like a touch pad.

I’m nowadays a proud owner of a Lenovo X220 and I use the track pointer included disabling the annoying touch pad thanks to the Touchpad Indicator GNOME extension. I say “annoying” because, when using the track pointer, I tend to touch every now and the the touch pad with unpredictable results.

So, with the new behavior and without the possibility of scrolling with a mouse wheel or a touch pad, viewports with a long extension are really difficult to browse with the pointer. This is the case for several of my mail folders in Evolution. As a result, I was getting nuts.

Therefore, I wanted to go back to the old behavior. This is: when clicking above the bar it would mean “PgUp” and when clicking below “PgDown”.

Fortunately, GTK-3.0 provides a way of tuning this. You have to add an option to its “settings.ini” file. If you want to apply it system wide, you will do it in “/etc/gtk-3.0/settings.ini” while if you want only to affect an user, you will do it in “~/.config/gtk-3.0/settings.ini”.

This is how it looks like:

Hope this helps to someone else! ๐Ÿ™‚

19 thoughts on “What’s up with the scrollbar?

  1. Right-clicking above or below scrollbar now behaves the same way left-click did by default.

    If I recall well you could jump directly to the position by right-clicking before so it would be correct to say buttons were swapped.

    P.S. This comment form is irritating.

  2. Nice! I’ve been wondering if there’s a way to change that unusable click-to-jump behavior. Now if only someone would make a UI for setting mouse behavior…

  3. Thanks for the hint !

    Did you know that you can use the “middle” touchpad button with the trackpad to have the same effect than a mouse wheel ?

    You’ll use as this :
    * hold pressed the middle button
    * and move up/down the trackpad and so you’ll have a mouse wheel effect

    To enable this behavior, you’ll have to add a configuration file in “/etc/X11/xorg.conf.d” with following lines :

    Section “InputClass”
    Identifier “Trackpoint Wheel Emulation”
    MatchProduct “TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device”
    MatchDevicePath “/dev/input/event*”
    Option “EmulateWheel” “true”
    Option “EmulateWheelButton” “2”
    Option “Emulate3Buttons” “false”
    Option “XAxisMapping” “6 7”
    Option “YAxisMapping” “4 5”
    EndSection

    It works well with my Thinkpad T420s, so I think it should work with yours.

    HTH,
    Adrien

  4. Funny, just yesterday I found this behaviour in my favourite music player, Quod Libet, and was about to file a bug report against it. You saved me from looking stupid :~)

    I wonder, what the advantage of the new slider behaviour could be?

  5. Pingback: Links 16/7/2013: Linux 3.11 Name, Another NSA Scandal | Techrights

  6. Thanks for the tip, that had been driving me mad. Strangely the setting doesn’t change the scrolling behaviour of the file dialog in thunderbird though even though it does change the scrolling of the main panels in thunderbird & firefox.

  7. That’s normal, because Mozilla uses GTK+2 and not GTK+3. If you want to test the new scrollbar behaviour, you can use e.g. Gnome applications, like Evolution, Empathy,…

  8. GTK2 supports gtk-primary-button-warps-slider but it defaults to false (on GTK3 it defaults to true) so it is set to true in /usr/share/themes/Adwaita/gtk-2.0/gtkrc which overrides /etc/gtk-2.0/gtkrc & ~/.gtkrc-2.0. This means the only way to change the behaviour for GTK2 is either to hack /usr/share/themes/Adwaita/gtk-2.0/gtkrc each time the theme is updated or create another that includes the Adwaita gtkrc and then sets gtk-primary-button-warps-slider = 0.

  9. Adrien, Jacobo, thanks for insisting on the tip with the middle button. I’ve give it again a try and seems to be working quite nicely. Maybe I’ve learned now to make use of it? ๐Ÿ™‚

Leave a Reply

Your email address will not be published. Required fields are marked *