-
-
Notifications
You must be signed in to change notification settings - Fork 641
Support mouse scrolling #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I've set clippy to allow that the function has too many lines, I can split it up if you want but it seems that all the event stuff should be handled in event. |
that's fine for now, a potential refactor of this should go into a different issue anyway |
I am not sure about this yet. if we do this we should do it right and check the bounds of the mouse and scroll in whatever element the mouse currently is. right now it scrolls whatever element is currently in the key-based focus |
That would require a lot of work. TUI does not have mouse support so that would have to be implemented first then when the scroll button is pressed/scrolled it can switch focus to the one under the mouse then scroll. |
not sure what you mean. |
Ah, Ok. I guess you could implement it like that. What I meant was that you cannot use the mouse to select a list item in TUI, but I guess that it probably wouldn't be that hard just to find out if the mouse is in a box. |
With this PR, I think I will come back to it after more mouse handling is implemented. This adds scrolling on the box selected by the keys but not the mouse(mouse selection is not implemented) and at the moment mouse selection is not a priority for me(This is after all a TUI), I did like being able to select with the keys and scroll with the mouse though. But before closing this PR, currently there is glitchy scrolling in GitUI, this would fix it, then further down the line an option could be implemented to turn on or off mouse scrolling. I am happy to make any edits to the PR for mouse scrolling, but I don't think I'm going to go as far as mouse selection. |
I think I'll continue with Mouse Selection, but not in this PR. This PR will only deal with Mouse Scrolling on the selected box, but I might put in a PR in the future on Full Mouse Selection. So, for me, this is ready to be merged, after review. |
@WizardOhio24 can you look into updating the branch to current master and fix the format? |
I think this is now ready to be reviewed/merged. |
This reverts commit 457f644.
This reverts commit 457f644.
Implements mouse scrolling for any lists.
Linked to #226