wustho / baca

TUI Ebook Reader
GNU General Public License v3.0
363 stars 4 forks source link

Fix glitchy mousewheel scrolling #11

Open xiota opened 1 year ago

xiota commented 1 year ago

Closes #10

wustho commented 1 year ago

@xiota I tested this, but this produce weird behaviour on my machine, one scroll mouse wheel will scroll 2 lines?

xiota commented 1 year ago

one scroll mouse wheel will scroll 2 lines?

On my computer, as far as I can tell, this works properly. Only one line at a time. How does the Textual demo work on your computer? (On my computer, the demo runs with python -m textual.)

wustho commented 1 year ago

one scroll mouse wheel will scroll 2 lines?

On my computer, as far as I can tell, this works properly. Only one line at a time. How does the Textual demo work on your computer? (On my computer, the demo runs with python -m textual.)

Tried it, indeed textual demo is also behaving weird. Seems like issue with my os setup or broken mouse/trackpad. Let me try it on other machine.

xiota commented 1 year ago

I'm using Textual v0.27.0. Looks like baca reqs specify Textual v0.16.0. Glitchy scroll behavior seems to result from some change in Textual v0.17.0.

wustho commented 1 year ago

@xiota maybe we should raise this glitchy issue to textual?

xiota commented 1 year ago

maybe we should raise this glitchy issue to textual?

I agree. I'll check to make sure it isn't already reported. If it isn't, I'll open a new issue and @ you so you can add info about the 2-line scrolling.

wustho commented 1 year ago

@xiota Thanks, mate. No worries about 2 line scroll tho, I think it has to do with signal being passed to parent widget, so the app and screen get scrolled then produces 2 line scroll. Might be also textual issue, but let me look at it for a while.

xiota commented 11 months ago

Did not get around to opening an issue upstream, but this seems to be a definite API change in 0.17.0 (2023-03-29) because the upstream examples were modified. Force pushed to sync with main. Changed textual requirement to >=0.17.0 <1.0.0. Manually edited pyproject.toml. Is that the correct way?

Note: I'm adding the changes for contents.py to aur/baca-ereader-git because Arch Linux is definitely affected by this.