1. 23 Mar, 2013 2 commits
    • Benoît Knecht's avatar
      Use signals to readjust_view_after_zooming() · c9eef954
      Benoît Knecht authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
      
      
      Instead of guesstimating the values of the scrollbars adjustments after
      a change in zoom level, connect callbacks to the "changed" GtkAdjustment
      event (which is emitted when the bounds or page_size of the adjustment
      change, e.g. when the zoom level changes), and compute the new values
      from there.
      
      The previous adjustment values are tracked in zathura->ui.hadjustment
      and zathura->ui.vadjustment (and updated by signal handlers as well), so
      that the view's position can be maintained while zooming.
      
      cb_view_hadjustment_changed() centers the page horizontally if a
      "best-fit" or "width" zoom is being performed, or if "zoom-center" is
      true; otherwise, it keeps the view horizontally centered around the same
      area of the page.
      
      cb_view_vadjustment_changed() always keeps the view vertically centered
      around the same area of the page.
      
      Many thanks to Marwan Tanager for thoroughly reviewing the various
      stages of this patch, and actually coming up with a working solution.
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
      c9eef954
    • Benoît Knecht's avatar
      Revert commit ce6e7351 · f5b02a97
      Benoît Knecht authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
      
      
      This wasn't correct. Padding is already accounted for:
      
        scale = (width - (pages_per_row - 1) * padding) /
                (pages_per_row * cell_width)
      
      If you add padding on the denominator, you end up with black margins on
      the sides of the window, which isn't what padding is for (i.e. insert a
      gap between rendered pages), and defeats the purpose of a "best-fit".
      Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
      f5b02a97
  2. 17 Mar, 2013 1 commit
  3. 03 Mar, 2013 2 commits
  4. 07 Feb, 2013 1 commit
  5. 19 Dec, 2012 1 commit
  6. 13 Dec, 2012 1 commit
  7. 10 Dec, 2012 1 commit
  8. 07 Dec, 2012 1 commit
  9. 06 Dec, 2012 2 commits
  10. 09 Oct, 2012 1 commit
  11. 06 Oct, 2012 1 commit
  12. 05 Oct, 2012 1 commit
  13. 19 Sep, 2012 1 commit
  14. 17 Sep, 2012 4 commits
  15. 03 Sep, 2012 1 commit
  16. 02 Sep, 2012 2 commits
  17. 14 Aug, 2012 1 commit
  18. 05 Aug, 2012 1 commit
  19. 01 Aug, 2012 2 commits
  20. 27 Jun, 2012 3 commits
    • Sebastian Ramacher's avatar
      Implement first-page-column. · 6d462f47
      Sebastian Ramacher authored
      Thanks to J. Commelin for the patch.
      6d462f47
    • Julian Orth's avatar
      We added three options · 30eda65a
      Julian Orth authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
      1) zoom-center :: bool
         zoom-center = false
      
         If zoom-center = false nothing changes.
         If zoom-center = true zooming respects the horizontal center of the
         pageview. That is, the vertical line dividing the displayed part of
         the document doesn't move within the document.
      
         Reasoning: When viewing a pdf with a margin we usually want to hide the
         margin at both sides by zooming in.
      
      2) scroll-hstep :: float
         scroll-hstep = -1
      
         If scroll-hstep < 0 nothing changes.
         If scroll-hstep >= 0 then scroll-hstep defines the scroll step in the
         horizontal direction.
      
         Reasoning: This allows us to make finer adjustments in the horizontal
         direction without the mouse and without loosing the ablility to
         navigate quickly through the document.
      
      3) search-hadjust :: bool
         search-hadjust = true
      
         If search-hadjust = true nothing changes.
         If search-hadjust = false searching does not adjust the horizontal
         center of the document when showing search results.
      
         Reasoning: When viewing a pdf with a margin we usually want to hide
         the margin at both sides by zooming in. The horizontal adjustment
         sometimes hides parts of the document by moving the horizontal
         center.
      30eda65a
    • Moritz Lipp's avatar
      Update zoom shortcut and zoom configuration · 23a48396
      Moritz Lipp authored
      23a48396
  21. 17 Jun, 2012 1 commit
  22. 16 Jun, 2012 1 commit
  23. 15 Jun, 2012 1 commit
  24. 08 May, 2012 2 commits
  25. 07 May, 2012 1 commit
  26. 06 May, 2012 2 commits
  27. 01 May, 2012 1 commit
  28. 30 Apr, 2012 1 commit