QChai/Added Fit To Height zooming, present in zoom options and inserted shortcut. (Bug 410929)
Added Fit Page To Height zoom setting, as per Bug#410929.
Specifically, created a ZOOM_HEIGHT KoZoomMode; extended KoZoomControlle::setZoom to zoom specifically on height when this mode is selected.
ZOOM_HEIGHT has a value of 16 to keep it seperate from ZOOM_PAGE and ZOOM_WIDTH as a mask where KoZoomController creates KoZoomAction instance. Can also make a shortcut to Fit To Page.
Test Plan
Play Test, first by zooming in/out by arbitrary amounts and then zooming "Fit Page Height", and also testing "Fit Page Height" after zooming to "Fit Page" and "Fit Page Width". Do this for both landscape and portrait documents.
Then, attempt to create Shortcut through Settings > Configure Krita... > Canvas Input Settings > Zoom Canvas, adding a new shortcut if a shortcut(s) do not exist already. Repeat first test by attempting to use shortcut.
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. -
I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!) -
I made sure my commits build individually and have good descriptions as per KDE guidelines. -
I made sure my code conforms to the standards set in the HACKING file. -
I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.