Skip to content
  • Jake Linder's avatar
    Add "Trim To Selection" feature · 172d78c6
    Jake Linder authored and Albert Astals Cid's avatar Albert Astals Cid committed
    Changes
    
    C1. Added submenu, moved "Trim margins" (TM mode) to it and added  "Trim To Selection" (TS mode).
    C2. Activating "Trim To selection" enters a new mousemode, similar to RectSelect for defining a viewport.
    C3. Once a viewport has been defined, it serves as a viewport for all pages in the document.
    C4. Left/Right pages are not treated differently.
    
    Manual Testing
    
    T1. Switching between modes enforces at most one active.
    T2. Can deactivate a mode by selecting it again from the menu.
    T3. When draggin bbox selection, clicking outside page does not crash.
    T4. When in "Facing Pages" mode, mouse release must be over any page (or is ignored).
    T5. Normalized bbox coords are computed relative to page indicated by point of mouse release.
    T6. Behave as expected when switching between any pair of No Trim/Trim Margins/Trim To Selection.
    T7. TM mode persisted across app restarts (existing behavior).
    T8. TS mode forgotten across app restarts (as desired).
    T9. Exiting and reselectin "Trim To Selection" prompts for new bbox.
    T10. Choosing a small Trim bbox enforces minimium dimensions size (As percentag of total), as
    it does in TM mode, because of the "scale big and crop down" implementation, to avoid huge pixmaps.
    TS mode minimum set at 20% (vs. TM mode's 50%).
    
    REVIEW: 124716
    BUGS: 351156
    172d78c6