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: 28 Mar 2003 10:44:17 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <1048866256.17532.39.camel@localhost.localdomain> References: <20030325193739.ZGIN3924.fep01-svc.swip.net@gaffa.gaia.swipnet.se> <1048780121.14517.22.camel@localhost.localdomain> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1048867002 23067 80.91.224.249 (28 Mar 2003 15:56:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 28 Mar 2003 15:56:42 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Mar 28 16:56:40 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 18ywDg-0005zs-00 for ; Fri, 28 Mar 2003 16:56:40 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18ywG7-0005gE-00 for ; Fri, 28 Mar 2003 16:59:11 +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 18ywAz-0005x8-0B for emacs-devel@quimby.gnus.org; Fri, 28 Mar 2003 10:53:54 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18ywAc-0005rZ-00 for emacs-devel@gnu.org; Fri, 28 Mar 2003 10:53:30 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18ywAa-0005qZ-00 for emacs-devel@gnu.org; Fri, 28 Mar 2003 10:53:29 -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 18yw3O-0002bq-00; Fri, 28 Mar 2003 10:46:02 -0500 Original-Received: from landau.devel.redhat.com (landau.devel.redhat.com [172.16.56.103])h2SFk1o14892; Fri, 28 Mar 2003 10:46:01 -0500 Original-To: rms@gnu.org In-Reply-To: X-Mailer: Ximian Evolution 1.2.2 (1.2.2-0) Original-cc: jan.h.d@swipnet.se 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:12708 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12708 On Fri, 2003-03-28 at 10:20, Richard Stallman wrote: > * 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) > > If you mean that it would be impossible for the end of the buffer to > be located above the last line of the window, that would be taking > away a feature that users are accustomed to. We can't do that. Was just an offhand comment :-) I didn't really expect it to be acted on. > * 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) > > It isn't a bug, though--and what else should the scroll bar do? > What happens in those themes will be logical, and will show that > the current visible window extends past the end of the text. Just because something makes logical sense doesn't mean it will make sense to users. But my concern is more: - It will be a confusing visual mess. - The visual representation won't correspond to the users ability to click on the scrollbar. (The ability to click on the arrow is not affected by the theme, just the visual representation.) - I suspect that many themes will simply not draw it correctly. > - 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. > > In Emacs, these aren't "extra blank lines". Emacs doesn't extend > the buffer contents to reach the bottom of the window. > The Gnumeric behavior isn't right for Emacs. > > The GUI for a program should reflect the data in the program, > not vice versa. I think there is a strong case to be made that the length of the scrollbar trough is MAX (length of document, maximum visible position) rather than simple the length of the document. Consider the case where the document is shorter than the screen height. In that case, there is a strong expectation that the thumb extends the entire length of the trough, and Emacs does that currently. If you _didn't_ do that, then you'd have a scrollbar that only occupies part of the trough but that it was impossible to drag up and down. While that might make logical sense, it would be highly confusing. So if this interpretation of the trough length corresponding to: MAX (length of document, maximum visible position) is used for documents shorter than the screen, I don't see a reason why it can't be used for the case of overscrolling as well. The main difficulty would be when to take the overscrolled area out of the trough size computation... usually you want to do it immediately, but when the user is dragging the scrollbar, probably not until they release the mouse. To do that with GTK+ currently, is a bit of a hack, you have to connect to the ::button-release-event signal on the scrollbar. But I think it would be a reasonable RFE for GTK+ to have some clean way of finding out when the drag finishes. Regards, Owen