[Top][All Lists]

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

Re: Scrollbars on GTK.

From: Stefan Monnier
Subject: Re: Scrollbars on GTK.
Date: Mon, 03 Nov 2008 00:45:13 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> The main issue, AIUI, is that the gtk scrollbar mechansim _assumes_ that
> "end of buffer" is always at the bottom of the window (except when
> that's impossible, such as a document smaller than the window), but
> emacs allows the end-of-buffer point to be positioned anywhere in the
> window.

If it was just that it'd be OK.  But the problem is that Emacs doesn't
know the "document size" other than in units that can change as you
scroll (e.g. in number of chars), so the thumb size needs to be able to
change as you drag it, otherwise it might hit the bottom of the
scrollbar before you really hit the bottom of the buffer.

I've tried many different ways to cope with the problem, but I still
haven't found one that I really like (other than the ones that remove
the stupid dogmatic "we know better" limitation in the toolkits, of
course.  I say "stupid" and "dogmatic" because in most cases these
limitations require extra code in the toolkit, whose sole benefit is to
try to confine the toolkit users into the narrow mindset of the toolkit

One of the least bad solutions IMO is to set the thumbsize to 0 just
before drag-scrolling and reset it to the right size once the scroll
is over.  This way, it seems to work perfectly except for the fact that
the thumb size acts weird during the scroll itself (but people
sometimes already find it odd for the thumb to change size during
scroll, so even the perfect solution has a similar surprise factor).
I'd be happy to use this hack rather than the current one, but last time
I suggested it, it wasn't well received.


reply via email to

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