unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs devel <emacs-devel@gnu.org>
Subject: Re: Addition to emacsbug.el
Date: Wed, 27 Oct 2004 16:50:07 -0400	[thread overview]
Message-ID: <jwv3bzzdhpy.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <417FF8DD.1000408@swipnet.se> (Jan D.'s message of "Wed, 27 Oct 2004 21:37:01 +0200")

> Hmm, I don't like it.  First of all, it is during a thumb-drag that you
> actually look at the thumb and the feedback you get from the size of the
> thumb (how much of the whole we are viewing, and where we currently are) is
> most useful.  Also, the thumb does not always show up under the mouse
> pointer, but often quite a bit from it.  If I continue to drag, the thumb
> jumps to the pointer.  I'd rather keep the current GTK behaviour, with
> a thumb size that includes the empty virtual page, but others may
> feel different.

Well, it's a question of taste, obviously.  I myself introduced the idea of
"empty virtual page" in the Xaw3d code (so if you're looking at a 25 lines
buffer in a 25-lines window, the thumb is only covering half of the
scrollbar).  But after using it for a while I decided I didn't like it
because I was never sure whether there was still something left in the
buffer (typically when reading Gnus messages).  There are various ways to
provide some other visual feedback, but experience showed that the scrollbar
is the feedback that I use.

> Secondly it does not work at all for GTK.  The event from the scroll bar
> stops when the thumb hits the bottom, so overscrolling for a window where
> the whole contents is shown does not happen.

I don't understand what you mean by "it doesn't work".  In the above case,
the thumb would start covering the whole scrollbar, but as soon as the drag
starts you make it size 0, so the user can drag at will and the thumb will
only hit the bottom of the scrollbar when the beginning of the thumb is at
the bottom (i.e. when the last char of the buffer is at the top of the
window).

The problem of not being able to move past the bottom is just the same
in Xaw3d.  Well, was, since AFAIK Xaw3g version 1.5g fixes it (it can be
argued that it was a bug since it didn't follow the Xaw behavior).

> Also, GTK thumbs can not be resized with ease like the Xaw and Motif ones,
> it involves setting the page size and the max and min just right.

Isn't that a small matter of programming (I mean, Emacs does change the size
of the thumb, already, right?).

> It depends on what we consider the perfect behaviour.  My idea (and
> I thought the other versions of Emacs behaved like this already, I don't use
> scroll bars much) is that when the thumb hits the bottom we enter
> overscrolling mode.  In that mode the thumb smoothly shrinks if dragged down
> further, and grows again if dragged up.

Yes, that's exactly what I mean by "perfect behavior", except that your
description only focuses on the scrollbar, whereas one key aspect is how it
relates to the actual buffer text displayed: when the thumb hits the bottom
is when the EOB is displayed.

> I am not sure if there is a general way to do this (resizing of thumbs and
> event handling differ between toolkits), or if it must be done individually
> for each toolkit.  Perhaps if this is done for two toolkits we can then
> rewrite it in a general way.  That would be 22.0 stuff I think.  But as GTK
> is just one toolkit and the scroll code to modify is either all in
> gtkutils.c or #ifdef:ed USE_GTK in xterm, the risc is low.

Currently a fair bit of code is shared, but not all of it.  the current
imperfect solution uses different tricks for different toolkits.

My suggested new imperfect solution is less dependent on details of the
toolkits so it reduces the among of toolkit-specific tweaks.
Check the patch I sent.

BTW, what about the other part of my patch:
merge xg_set_toolkit_scroll_bar_thumb back into
x_set_toolkit_scroll_bar_thumb ?


        Stefan

  reply	other threads:[~2004-10-27 20:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-27  9:37 Addition to emacsbug.el Jan D.
2004-10-27 13:27 ` Stefan Monnier
2004-10-27 19:37   ` Jan D.
2004-10-27 20:50     ` Stefan Monnier [this message]
2004-10-28  6:21       ` Jan D.
2004-10-28 19:54         ` Stefan
2004-10-29  9:37           ` Jan D.
2004-10-29 12:28             ` Jan D.
2004-10-29 21:17             ` Stefan
2004-10-30 15:01               ` Jan D.
2004-10-30 16:53                 ` Stefan
2004-10-30 17:17                   ` Jan D.
2004-10-28  6:24 ` Richard Stallman
2004-10-28  8:07   ` Jan D.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv3bzzdhpy.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).