mudlej / mj_pdf

GNU General Public License v3.0
155 stars 4 forks source link

[Feature request] Snap zoom to page #21

Open victorbnl opened 1 year ago

victorbnl commented 1 year ago

When you open a PDF in the app, it opens by default with a zoom level which fits page width, and I think it’s great.

But then you want to zoom in on something in the PDF, and then get back to a “fit page width” zoom level. But you can’t, so you have to work around it, by setting a zoom level a tad superior to what is required to fit page width, in order not to have grey borders around the page, and enable horizontal lock. Or be extremely precise and find the exact zoom level such that there are no borders around the page and no horizontal scroll.

So the idea would be to allow the user to set a “fit page width” zoom level afterwards. I see two ways of implementing it:

  1. Add options to the menus like Zoom > Fit page width
  2. Add snapping when user is zooming near a “fit page width” level

Edit: I just figured out one can get a “fit page width” zoom level back by zooming out until the page have borders around it and double-tapping. I’m not sure if it should be left as is though, as the fact it took me that much time to figure out shows it’s bad UX. It does make it a low-priority issue though.