[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gtk scrollbar: thumb too short

From: Richard Stallman
Subject: Re: Gtk scrollbar: thumb too short
Date: Sun, 30 Mar 2003 14:24:27 -0500

    An observation I'd make is that a scrollbar really encodes two

     - 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) - 

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]