Skip to content

Add checkbox class to allow for word wrapping

Scott Petrovic requested to merge (removed):petrovic/checkbox-wrap into master

We use QCheckbox in a lot of areas on the user interface. One issue with this component is that there is no way to do word wrapping. This is going to create issues as we try to make the user interface take up less space. I would rather have word wrappingg then be forced to remove a lot of text from our checkboxes.

The idea of this class will replace QCheckbox in a lot of the areas we currently use it. I tried to map some of the existing QCheckbox methods, so it shouldn't be too hard to swap a lot of them out without breaking any functionality.

Test Plan

Compiled it and tried adding an instance of the class on the UI. I put something on the welcome screen, the resized the welcome screen to make sure the text would wrap. I also made sure the label was clickable so that would toggle the checkbox.

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