Add Reset Display action and tweak existing view actions
Users sometimes request a "Reset Display" action, where zoom mode, rotation, and mirroring reset to their default states, all in one action. This MR implements such an action and tweaks various existing view actions.
Changes include:
- New Reset Display action, as a keyboard shortcut and as a canvas input. Resets mirroring to off, rotation to 0 degrees, and zoom state to fitting the view.
- View Print Size action.
- CSP shortcut scheme tweaked to use newer, more accurate view actions.
- "Canvas" menu in the View menu is renamed to "Zoom, Rotate, and Mirror", and the actions are re-ordered to Zoom, Rotate, and Mirror.
- "Zoom Fit to Page" actions renamed to "Fit to View" to make more sense in the context of Krita. They should also now have icons.
- "Reset Zoom" action is renamed to "Zoom to 100%" to be less ambiguous. In the context of Reset Display, Fit View mode is the default state, as that's the default state when creating/opening a document.
- Fit to View button added to pop-up palette.
- Re-ordered the zoom modes in the status bar widget so that "Fit View" is first instead of between the other fit modes.
- Unflattened some buttons in the canvas input profile manager and fixed a tooltip.
TODO
This MR could be merged as-is, but I'd like to do the following first:
-
Add "Show Print Size" action and add it to the View menu -
Add "Reset Display" as a canvas input
Test Plan
- Test the Reset Display action in various ways. Make sure it resets Zoom, Rotation, and Mirroring properly.
- Make sure there's no conflicts from the CSP shortcut scheme changes.
- Make sure the Fit View button in the pop-up palette works properly.
- Make sure the Fit mode actions in the statusbar widget work properly.
- Make sure the Canvas Mapping Mode widget updates properly when using the View Print Size action, and vice versa.
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.
Edited by R. B.