[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gtk scrollbar: thumb too short
From: |
Owen Taylor |
Subject: |
Re: Gtk scrollbar: thumb too short |
Date: |
07 Apr 2003 14:30:46 -0400 |
On Mon, 2003-04-07 at 12:57, Stefan Monnier wrote:
> > > > 3. Make the GTK scrollbar more customizable so that it can
> > > optionally
> > > > handle a character based approach and hence behave, within
> > > Emacs,
> > > > more like the native scrollbar than the pixel based variant of
> > > the
> > > > GTK scrollbar.
> > >
> > > I think this is the only reasonable solution.
> > >
> > > I agree with Miles--this is the only right way.
> > >
> > > Owen, would you please implement this facility in the GTK scroll bar?
> >
> > I don't think there has been a satisfactory explanation of how you
> > are going to deal with minimum size issues; which for some themes
> > occur on quite moderately sized buffers. (As I said earlier, for
> > Red Hat's default theme, the minimum scrollbar thumb size is
> > ~30 pixels)
>
> IIUC, the scrollbar widget has the following:
>
> total-size
> minimum thumb size
> thumb size
> thumb position
>
> Where minimum-thumb-size is (for all intents and purposes here) a constant.
> Let's simplify things and subtract minimum thumb size from the current
> thumb size and from the total, we get:
>
> total-size
> thumb size
> thumb position
>
> where
>
> 0 <= thumb-size <= total-size
> thumb-size + thumb-position <= total-size
This isn't a "simplification", it is a different algorithm
from what GTK+ uses. The scrollbar thumb size in GTK+
is:
MAX (min_size, total_size * document_page_size/document_size)
Not:
min_size + (total_size - min_size) * document_page_size / document_size
The difference between these two is substantial. It's
possible to fake your algorithm using GTK+'s range
code, but it requires knowing both the minimum size in
pixels (easy to determine as a style property) and the
trough size in pixels (a complicated function of style
properties and the allocated size of the range.)
Regards,
Owen
- Re: Gtk scrollbar: thumb too short, (continued)
- Re: Gtk scrollbar: thumb too short, Luc Teirlinck, 2003/04/01
- Re: Gtk scrollbar: thumb too short, Miles Bader, 2003/04/01
- Re: Gtk scrollbar: thumb too short, Kai Großjohann, 2003/04/02
- Re: Gtk scrollbar: thumb too short, Luc Teirlinck, 2003/04/02
- Re: Gtk scrollbar: thumb too short, Kai Großjohann, 2003/04/02
- Re: Gtk scrollbar: thumb too short, Luc Teirlinck, 2003/04/02
- Re: Gtk scrollbar: thumb too short, Kai Großjohann, 2003/04/02
- Re: Gtk scrollbar: thumb too short, Richard Stallman, 2003/04/03
- Re: Gtk scrollbar: thumb too short, Owen Taylor, 2003/04/07
- Re: Gtk scrollbar: thumb too short, Stefan Monnier, 2003/04/07
- Re: Gtk scrollbar: thumb too short,
Owen Taylor <=
- Re: Gtk scrollbar: thumb too short, Stefan Monnier, 2003/04/07
- Re: Gtk scrollbar: thumb too short, Owen Taylor, 2003/04/07
- Re: Gtk scrollbar: thumb too short, Stefan Monnier, 2003/04/07
- Re: Gtk scrollbar: thumb too short, Owen Taylor, 2003/04/07
- Re: Gtk scrollbar: thumb too short, Stefan Monnier, 2003/04/07
- Re: Gtk scrollbar: thumb too short, Richard Stallman, 2003/04/07
- Re: Gtk scrollbar: thumb too short, Owen Taylor, 2003/04/08
- Re: Gtk scrollbar: thumb too short, Miles Bader, 2003/04/08
- Re: Gtk scrollbar: thumb too short, Richard Stallman, 2003/04/08
- Re: Gtk scrollbar: thumb too short, Owen Taylor, 2003/04/09