bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#62707: 30.0.50; [PATCH] Non toolkit scroll bar handle


From: Manuel Giraud
Subject: bug#62707: 30.0.50; [PATCH] Non toolkit scroll bar handle
Date: Fri, 07 Apr 2023 09:55:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Fri, 07 Apr 2023 08:46:14 +0200
>> From:  Manuel Giraud via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>> 
>> I'd like to fix how the handle of scroll bars in non-toolkit build keeps
>> changing size when scrolling a file.
>
> Fix it in what way? what is wrong with what we have now?

When I'm scrolling a file (with 'C-v'/'M-v' for example), the handle of
the vertical scroll bar has its height that keeps changing even though
the same amount of text is showed (there is no long line breaking
involved).  I think it is distracting and weird but I may be missing
something.

>> This first patch does not do this but it just simplify how those
>> scroll bar are drawn.
>
> Please explain the rationale for each part of this change.  It isn't
> obvious, at least not to me.

While I was trying to understand how the scroll bar and its handle are
drawn, I read this code where drawing a scroll bar is:

       1- Fill the rectangle area above the handle (with background)
       2- Fill the rectangle area of the handle (with foreground)
       3- Fill the rectangle area below the handle (with background)

It seems more "natural" to me to:

       1- Fill the entire scroll bar area (with background)
       2- Fill the handle area on top of it (with foreground)
-- 
Manuel Giraud





reply via email to

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