From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: Gtk scrollbar: thumb too short Date: Mon, 07 Apr 2003 12:57:02 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200304071657.h37Gv2LG024488@rum.cs.yale.edu> References: <20030325193739.ZGIN3924.fep01-svc.swip.net@gaffa.gaia.swipnet.se> <3E8345E8.4090509@swipnet.se> <1048872463.17161.132.camel@localhost.localdomain> <1049134327.3326.74.camel@localhost.localdomain> <84of3p2m44.fsf@lucy.is.informatik.uni-duisburg.de> <200304021352.h32DqLO11793@eel.dms.auburn.edu> <1049729721.4045.47.camel@localhost.localdomain> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1049734922 12087 80.91.224.249 (7 Apr 2003 17:02:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 7 Apr 2003 17:02:02 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Apr 07 19:02:00 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 192a0O-00038W-00 for ; Mon, 07 Apr 2003 19:02:00 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 192a3y-0002Ri-00 for ; Mon, 07 Apr 2003 19:05:43 +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 192a0Y-0005NK-02 for emacs-devel@quimby.gnus.org; Mon, 07 Apr 2003 13:02:10 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 192ZwD-0003VF-00 for emacs-devel@gnu.org; Mon, 07 Apr 2003 12:57:41 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 192Zw2-0003OM-00 for emacs-devel@gnu.org; Mon, 07 Apr 2003 12:57:30 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 192Zvf-00038y-00; Mon, 07 Apr 2003 12:57:07 -0400 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h37Gv3x6024490; Mon, 7 Apr 2003 12:57:03 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h37Gv2LG024488; Mon, 7 Apr 2003 12:57:02 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Owen Taylor Original-cc: rms@gnu.org Original-cc: Luc Teirlinck Original-cc: kai.grossjohann@gmx.net 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:12968 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12968 > > > 3. Make the GTK scrollbar more customizable so that it can optionally > > > handle a character based approach and hence behave, within Emacs, > > > more like the native scrollbar than the pixel based variant of the > > > GTK scrollbar. > > > > I think this is the only reasonable solution. > > > > I agree with Miles--this is the only right way. > > > > Owen, would you please implement this facility in the GTK scroll bar? > > I don't think there has been a satisfactory explanation of how you > are going to deal with minimum size issues; which for some themes > occur on quite moderately sized buffers. (As I said earlier, for > Red Hat's default theme, the minimum scrollbar thumb size is > ~30 pixels) IIUC, the scrollbar widget has the following: total-size minimum thumb size thumb size thumb position Where minimum-thumb-size is (for all intents and purposes here) a constant. Let's simplify things and subtract minimum thumb size from the current thumb size and from the total, we get: total-size thumb size thumb position where 0 <= thumb-size <= total-size thumb-size + thumb-position <= total-size What we need is that when the mouse is moved such that thumb-size+thumb-position would become larger than total-size, [the scrollbar should behave as if] thumb-size is reduced to total-size - thumb-position. > I also am not convinced that the behavior is right from the point of > view of a user; the ends of the scrollbar should be the ends > of the scrollbar. Total agreement ;-) : the user shouldn't be prevented from moving the thumb-position to the end (i.e. to toal-size) just because the thumb-size is currently non-zero. > However, I was reminded this morning that a facility that allows > you to implement your desired behavior was actually added prior > to GTK+-2.2. > > If you connect to the "adjust_bounds" signal on GtkRange (the > base class for GtkScrollbar), this gives you the chance, when > the user clicks the arrows or drags the thumb, to adjust > the bounds and/or page size *before* GTK+ clamps the position. > > So, it should be pretty trivial to make the thumb shrink as the > user drags past the end position of the scrollbar. That sounds like it might indeed do the trick. Stefan