nano-devel
[Top][All Lists]
Advanced

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

Re: how should dragging work, and is it worth it?


From: Marco Diego Aurélio Mesquita
Subject: Re: how should dragging work, and is it worth it?
Date: Tue, 26 May 2020 01:31:13 -0300

I was planning to work on this during the weekend but ended up doing
other things. Nevertheless, after some hacking, I got it working!

On 5/24/20, Benno Schulenberg <address@hidden> wrote:
> Maybe Marco is right and dragging the slider should move the cursor
> too (if it threatens to go offscreen), the same way as for scrollup/
> scrolldown.  Or maybe too few people ever drag a scroll-bar slider
> and it's not worth the trouble to implement dragging at all.
>

I have just implemented the way you described as preferable. During my
quick tests it works just like a gui application, the cursor can go
offscreen and the screen goes to where it is if it is moved or any
char is added.

I really think it is worth it.

Now, about the code: It ended up being not too intrusive but a bit
big. There is some code copied from other parts to get the size of the
scrollbar, so it can still get smaller. Current quality is
proof-of-concept but the behavior may be already the desired.

Benno, do you want me to post my current proof-of-concept quality code
for you to test its behavior (and possibly point me to the correct
direction with the changes) or should I wait before it is more
merge-worthy quality before sending?

I think the scrollbar can be made to work just like a "real"
scrollbar. I see 3 events that must be handled: clicking on the
buttons, clicking the area between the buttons and the paddle and
dragging the paddle. Of these 3 events, the most complicated is
dragging and it seems to be already working. The other 2 will be very
easy to implement after dragging is working correctly. So if you want
me to implement a "real" scrollbar, I think I can do it.



reply via email to

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