unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "grischka" <grishka@gmx.de>
To: "David Reitter" <david.reitter@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: gtk scroll bar deficiency
Date: Fri, 15 Jun 2007 13:41:22 +0200	[thread overview]
Message-ID: <012f01c7af43$04d0a240$560690d4@j4f3n1> (raw)
In-Reply-To: 1088867D-4306-4391-B0D0-E9CF971AE82B@gmail.com

David Reitter wrote:
> And similarly, keeping the editor at a constant size is pretty much  
> impossible when the total number of lines in a buffer is unknown.  
> That is, of course, very confusing to many users who consider  
> switching to Emacs from another editor. To them, the vertical scroll- 
> bar has to do with the vertical position in the buffer and the  
> vertical dimensions of the window and the buffer. 

Yes. It's a matter of feedback between hand and eye that you want
mouse-movements to be consistent with the text-flow in the window. 
You can get over minor flaws, but it still feels incomfortable. 

> For the scroll-bar, a  
> reasonable estimate would do the job (count line lengths in various  
> randomly sampled portions of the buffer if the buffer is big): the  
> scroll-bar is a visual tool and not an exact science. The number of  
> characters on the last page(s) may need to be precisely determined,  
> though

Basically, an estimation over the file and an accurate calculation 
on the last page. I think it should work.

Jason Rumney wrote:
> An reasonable estimate is what we have now. If the estimate is 
> wrong, then the results are one of: 

...(several bugs)

Well, it should not result in bugs. I'm rather shure you have 
just overlooked something.

What you do and how you do it depends on what you want, 
in the first place:

(1) keep the character-based scrolling as is, that means put up 
    with the inconsistent behaviour with vertical dimension 
    movements as David pointed out above.

(2) switch to line-based scrolling, that means much better behaviour 
    except in areas with images or diverging font-heights, but
    even then better than with (1)

(3) switch to pixel-based scrolling, that means flawless behaviour, 
    but it could be expensive.

All of (1-3) should work buglessly but within the limitations of 
the approach of course.

Both (1) and (2) might need bits of (3), i.e. to calculate 
the start of the last page.

--- grischka

  parent reply	other threads:[~2007-06-15 11:41 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14  8:52 gtk scroll bar deficiency grischka
2007-06-14  9:20 ` Thien-Thi Nguyen
2007-06-14 11:56   ` grischka
2007-06-14 17:21   ` grischka
2007-06-14 18:22     ` David Reitter
2007-06-14 20:30       ` Jason Rumney
2007-06-15 11:41       ` grischka [this message]
2007-06-15 14:48         ` Stefan Monnier
2007-06-18 13:32           ` grischka
2007-06-14 19:05     ` Stefan Monnier
2007-06-15 11:46       ` grischka
2007-06-15 14:56         ` Stefan Monnier
2007-06-15 15:56           ` Sam Steingold
2007-06-15 18:35             ` Stefan Monnier
2007-06-15 18:58               ` Sam Steingold
2007-06-14  9:24 ` Miles Bader
  -- strict thread matches above, loose matches on Subject: below --
2007-06-11 18:05 Sam Steingold
2007-06-11 19:25 ` Stefan Monnier
2007-06-11 19:54   ` Sam Steingold
2007-06-11 21:09     ` Stefan Monnier
2007-06-12  5:52     ` Jan Djärv
2007-06-12  5:57       ` Ralf Angeli
2007-06-12  6:06         ` Jan Djärv
2007-06-12  6:12           ` Ralf Angeli
2007-06-12  7:40             ` Jan Djärv
2007-06-15 20:51               ` Ralf Angeli
2007-06-12 11:09         ` David Reitter
2007-06-12  8:49       ` Andreas Schwab
2007-06-12  9:10         ` Jan Djärv
2007-06-12 13:04       ` Sam Steingold
2007-06-12 13:11         ` David Kastrup
2007-06-12 13:19           ` Sam Steingold
2007-06-12 15:13         ` Stefan Monnier
2007-06-12 22:38     ` Davis Herring

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='012f01c7af43$04d0a240$560690d4@j4f3n1' \
    --to=grishka@gmx.de \
    --cc=david.reitter@gmail.com \
    --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).