From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Gtk scrollbar: thumb too short Date: Sun, 30 Mar 2003 14:24:27 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20030325193739.ZGIN3924.fep01-svc.swip.net@gaffa.gaia.swipnet.se> <3E8345E8.4090509@swipnet.se> <1048872463.17161.132.camel@localhost.localdomain> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1049052354 32678 80.91.224.249 (30 Mar 2003 19:25:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 30 Mar 2003 19:25:54 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Mar 30 21:25:50 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 18ziRC-0008Ug-00 for ; Sun, 30 Mar 2003 21:25:50 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18ziUf-0002qW-00 for ; Sun, 30 Mar 2003 21:29:25 +0200 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 18ziQe-0001DE-05 for emacs-devel@quimby.gnus.org; Sun, 30 Mar 2003 14:25:16 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18ziQD-00015E-00 for emacs-devel@gnu.org; Sun, 30 Mar 2003 14:24:49 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18ziPz-0000Vt-00 for emacs-devel@gnu.org; Sun, 30 Mar 2003 14:24:37 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.10.13) id 18ziPr-0000Pc-00 for emacs-devel@gnu.org; Sun, 30 Mar 2003 14:24:27 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 18ziPr-0007Sh-00; Sun, 30 Mar 2003 14:24:27 -0500 Original-To: Owen Taylor In-reply-to: <1048872463.17161.132.camel@localhost.localdomain> (message from Owen Taylor on 28 Mar 2003 12:27:43 -0500) Original-cc: jan.h.d@swipnet.se 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:12752 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12752 An observation I'd make is that a scrollbar really encodes two things: - A value - A percentage of a total size If we look at the scrollbar on the screen, we have: v = thumb_start / (trough_pixels - thumb_pixels) p = thumb_pixels / trough_pixels That is unnecessarily complicated. I think the position value that users see is thumb_start / trough_pixels. That is much simpler and it is visually evident. For the normal GTK+ case these two quantities are related to the document size. v = start_of_visible / MAX (size_of_visible, size_of_document) - size_of_visible thumb_start / trough_pixels normally corresponds to start_of_visible / MAX (size_of_visible, size_of_document) If this relationship continues to apply when Emacs overscrolls, you get the behavior I have asked for. I think of the scroll bar as showing how the document is divided into three parts: the part above the screen, the part on the screen, and the part below the screen. The sizes of the three parts of the scroll bar are in proportion to those three parts of the document. When Emacs overscrolls, the last part of the document has negative size. Properly speaking, the thumb should extend beyond the end of the trough. Alas, that is impossible. The Emacs 20.7 behavior is the closest possible approximation.