![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Mar 2023
Device: none
|
![]()
Dear user of digital books, dear calibre user, dear calibre author,
I think it would it be a very nice tiny feature if calibre's viewer (Linux version) would jump to the next TOC item of the book when scrolling vertically with the mouse wheel. What do you think? Maybe I can bring in my vanishing small programming skills into this huge project by implanting this feature. Best regards and honor, good reading Markus ![]() ![]() |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,553
Karma: 20170928
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There are already keyboard shortcuts to do this. Ctrl+pagedown IIRC. The mouse wheel is used for scrolling pages.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Mar 2023
Device: none
|
![]()
Dear Kovid,
Thank you for your reply, and the amazing work on calibre. I've already noticed the scrolling ability through toc by PgDown/PgDown Key, and would still prefer to use the mouse wheel for this. I guess programmatically, this feature could be easily implemented to the wheelevent handler of the QtWebEngineWidget of the ebook-viewer and differentiate angleDelta in x- and y-component accordingly horizontal and vertical scrolling. This should not interfere with the common one dimensional usage of the mouse wheel. Rather, it would add some nice functionality for the viewer, IMHO. Hope that I have not bothered you or others by this proposal/idea. Best regards Bookfighter |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,553
Karma: 20170928
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
As I said scrolling vertically is already used for turning pages. Scrolling horizontally is available. And the viewer code is platform independent, it work sin browsers as well, so its not implemented using Qt, the relevant code would be in paged_mode.pyj, see the onwheel function.
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Mar 2023
Device: none
|
toc-item-scrolling
Ok, scrolling with mouse wheel in y-direction works indeed fine. (Maybe in n-column reading views, it should scroll also in n-column steps, as classical scrolling with classical paper pages does.)
My proposal was to add scrolling in x-direction (for some newer mice) in such a way that one can scroll through the TOC, and lands at the beginning of each item in the viewer. According to Qt-Documentation, the rotation of the mouse wheel can be discerned by angleDelta of the wheel event: def wheelEvent(self,e): print("x: ", e.angleDelta().x()) print("y: ", e.angleDelta().y()) I've just implemented this via plain PyQt6, for testing purpose, and looked at your Handlewheel function in paged_mode.pyj. ![]() if deltaX: toc-item+= sgn(deltaX) showTocItem(toc-item) but unfortunately, I'm still not able to get the cmake tool to work properly for building and testing this of my own. But I will try. Maybe other users/programmers can help here. ![]() For usual one-dimensional mouse wheels, one could use this toc-item-scrolling when hovering over the TOC and using the common mouse wheel. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,553
Karma: 20170928
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
And you dont need to build calibre to make changes to its code. https://manual.calibre-ebook.com/develop.html |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Vertical Scrolling | aristide | Marvin | 2 | 01-23-2019 08:05 PM |
Vertical Scrolling | Ricky D'Angelo | Kindle Fire | 6 | 12-05-2018 10:40 PM |
Vertical scrolling | vs40 | Marvin | 1 | 10-22-2015 12:58 PM |
Vertical scrolling... | Holx | Marvin | 6 | 07-17-2014 04:35 PM |
Touch Vertical scrolling using app | holgalee | Nook Developer's Corner | 3 | 06-18-2012 09:29 AM |