Skip to content

KisDelayedSaveDialog: port to KoDialog and fix extra spacing

This commit simplifies and standardizes the layout of the delayed load/save dialog. Porting it to the standard KoDialog class enables mapping the custom buttons to known standard actions (Ok, Cancel, and User1) while also being able to squish the dialog whenever the buttons are hidden.

I've also fixed the dialog being still able to be closed via the X button when the type is Forced.

Types Before After
Save Captura_de_pantalla_2023-01-03_134929 Captura_de_pantalla_2023-01-03_144028
General Captura_de_pantalla_2023-01-03_135221 Captura_de_pantalla_2023-01-03_144336
Forced Captura_de_pantalla_2023-01-03_135413 Captura_de_pantalla_2023-01-03_150512

Test Plan

Build Krita, preferably along MR !1607 (merged) since that one has the easiest way to trigger this dialog. Load a heavy file e.g. !1403 (comment 452849) and check the dialog's layout.

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.

Merge request reports