GNOME Bugzilla – Bug 63735
scrollbar left click should do a page step
Last modified: 2011-02-04 16:09:32 UTC
To be consistent with Gtk+ 1.2, windoze etc. a left click into the scrollbar area should do a 'page step' instead of a small 'scroll step'. Here's the patch: --- from-cvs/gtk+/gtk/gtkrange.c Fri Nov 02 14:02:04 2001 +++ my-gtk/gtk+/gtk/gtkrange.c Sun Nov 04 14:17:44 2001 @@ -993,12 +993,12 @@ { if (range->trough_click_forward) { - return range->layout->grab_button == 3 + return range->layout->grab_button == 1 ? GTK_SCROLL_PAGE_FORWARD : GTK_SCROLL_STEP_FORWARD; } else { - return range->layout->grab_button == 3 + return range->layout->grab_button == 1 ? GTK_SCROLL_PAGE_BACKWARD : GTK_SCROLL_STEP_BACKWARD; } }
Button 1 should definitely be a page click. I'm not sure what button 3 should do. In XP it brings up a menu with "Scroll Here" (button 2 currently), Page Up/Down and Scroll Up/Down. Which is amusing but probably not actually useful. Perhaps they should do the same as a button 3 click on the arrows - go to the beginning / end. Or maybe nothing, but there is no particular advantage to doing nothing unless we think people are going to accidentally right click on the trough. I'm applying your patch to do steps for now, on the theory that many scrollbars are in the 1-2 pages range, in which case beginning/end is no different than scrolling by pages.
FWIW, I'd vote that if middle-click (currently 'scroll here') ends up doing something more useful than right-click, as it sounds like it might here, we swap those behaviours, or at least just duplicate them. (Although if we duplicate, people might start wondering what the difference is when there actually isn't one). That is: * left click = scroll-page; * right click = scroll-here; * middle click = either: nothing (people might think it's b0rked), scroll-line (fairly useless), scroll to start/end (perhaps mildly useful), or scroll-here as well (other toolkits use this, so people may do it out of habit). Certainly if we can only think of two useful behaviours, they should probably be assigned to left and right buttons, not left and middle. As for the popup menu option, I can see that the odd app might have handy things to add to it, e.g. "Goto next section", "Goto page...", but I can't see it being generally useful for all scrollbars.