Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
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

ui: dynamic page allocation to gtk grid #721

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

jchilds0
Copy link

Implements #719 to resolve in #449, #365, #253, #200, and #65

Tested on the ARM reference manual (15,000 pages) https://developer.arm.com/documentation/ddi0487/latest, and Intel manual (5000 pages) https://developer.arm.com/documentation/ddi0487/latest, and doesn't crash when zooming in to either document.

I'm not sure if the document widget should stay as a GTK widgt or change to a normal struct, I'm fine with either.

Care needs to be taken when manually setting the value of the ui viewport, since the document widget changes the grid. zathura_document_widget_[set_ratio_from_value|get_ratio] functions wrap zathura_adjustment_[set_ratio_from_value|get_ratio] functions to handle the conversion from document ratio to widget ratio.

The canvas size chosen is 32,767 which is the max cairo canvas height (perhaps this can be increased but I don't know how much cairo can handle). zathura_document_widget_render updates the pages in the grid when the current page is within 1 page of the current pages shown. There's probably a smarter way to handle this as it doesn't do to well with scrolling in zoomed out documents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant