From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Owen Taylor Newsgroups: gmane.emacs.devel Subject: Re: Gtk scrollbar: thumb too short Date: 27 Mar 2003 10:48:42 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <1048780121.14517.22.camel@localhost.localdomain> References: <20030325193739.ZGIN3924.fep01-svc.swip.net@gaffa.gaia.swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1048781648 29228 80.91.224.249 (27 Mar 2003 16:14:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 27 Mar 2003 16:14:08 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Mar 27 17:14:03 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18ya0S-0007XI-00 for ; Thu, 27 Mar 2003 17:13:32 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18ya2O-0000Pl-00 for ; Thu, 27 Mar 2003 17:15:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18yZx4-0007Dh-01 for emacs-devel@quimby.gnus.org; Thu, 27 Mar 2003 11:10:02 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18yZwI-0006u8-00 for emacs-devel@gnu.org; Thu, 27 Mar 2003 11:09:14 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18yZhx-00008p-00 for emacs-devel@gnu.org; Thu, 27 Mar 2003 10:54:26 -0500 Original-Received: from nat-pool-rdu.redhat.com ([66.187.233.200] helo=lacrosse.corp.redhat.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18yZeK-0006xo-00; Thu, 27 Mar 2003 10:50:40 -0500 Original-Received: from landau.devel.redhat.com (landau.devel.redhat.com [172.16.56.103])h2RFoPo02925; Thu, 27 Mar 2003 10:50:25 -0500 Original-To: rms@gnu.org In-Reply-To: X-Mailer: Ximian Evolution 1.2.2 (1.2.2-0) Original-cc: "Jan D." Original-cc: jody@gnome.org Original-cc: kai.grossjohann@uni-duisburg.de X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12658 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12658 On Wed, 2003-03-26 at 22:29, Richard Stallman wrote: > > I understand why the scrollbar thumb is shorter than I think it > > should be: to allow for placing the last line of the buffer in the > > top line of the window. > > > > But still, I'm not so happy with the current look of the scrollbar. > > It confuses me quite a bit. Is there no way to make the thumb extend > > to the bottom of the scrollbar area when end of buffer is visible, and > > yet to also allow scrolling further down so that the last line of the > > buffer can be moved to the top of the window? > > Not really. The code in Emacs does not specify the length of the > thumb, GTK calculates it. Emacs tells GTK how big the buffer is, how > big a page is and where we are in the buffer. > > What happens if the app specifies a position that is less than one > page away from the end? Is that considered invalid? > > My suggestion is to display a thumb that rises from the bottom of the > scroll bar, but is shorter than normal, as if the bottom of the thumb > were hidden beyond the end of the scroll bar. Others may think > of a better way to indicate this situation. > > When GTK decides that the thumb extends to the bottom it will not > emit events for anymore downwards motion with the mouse, only upwards. > > Perhaps GTK should have an option so the app can let the thumb move > further down. What do people think of that? Thoughts here, in no particular order: * I've always found the emacs behavior with respect to the end of the buffer quite confusing personally... I think it would be far less confusing if the region that was scrolled was actually confined to the lines of the buffer (or maybe lines in buffer + 1) It's very easily in emacs's default configuration currently to accidentally create text files with lots of trailing blank lines since there is no visual differentiation between blank lines and overscrolled space. (Emacs-21.2 with Xaw3d seems to be just buggy ... if the user drags the thumb of the scrollbar past the end of the buffer it shrinks to a smaller size and doesn't come back.) * Allowing dragging the scrollbar thumb past the end of the trough is something I'm quite hesitant to do: - It will look like a bug to the user - Some themes may not be able to handle such a case nicely (think of a theme where the stepper arrows are round circles in the trough instead of being as wide as the trough ... in that case the thumb can't simply be truncated by the stepper arrow) * There have been some somewhat similar requests; Gnumeric (I've CC'ed Jody Goldberg in case he has comments) goes to some extensive hack lengths so that you can click on the down arrow in the scrollbar and add extra blank lines. (You can also extend the area by cursoring past the ends of the buffer.) However, differing from the Emacs behavior: - The extra blank lines actually extend the scrollable space - that is, the thumb is always confined to the trough, it just shrinks to indicate the longer scrollbar space. - When you scroll back up, the extra space vanishes. I wonder if we added some clean option to GTK+ to allow this behavior, whether it would satisfy the requirements of Emacs? The main difference is that you can't, by dragging the scrollbar, position past the end of the buffer. You would need to do it by clicking on the down arrow (middle button goes down a page), or by keyboard commands such as C-l. (Note that Emacs could already implement this behavior for handling programmatic overscrolling already ... it's only the clicking on the down-arrow part that requires hacks in gnumeric.) Regards, Owen