[Top][All Lists]

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

Re: gtk scroll bar deficiency

From: grischka
Subject: Re: gtk scroll bar deficiency
Date: Fri, 15 Jun 2007 13:41:22 +0200

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

reply via email to

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