Skip to content

Ensure that checkboxes are shown in menus

Karl Ove Hufthammer requested to merge (removed):show-checkboxes-in-menus into master

The old code tried to add an icon for all menu items, even for empty icon names. Most themes (including the default ‘Fusion’ theme, but not KDE’s ‘Breeze’) don’t display checkboxes when a menu item already has an icon. The result was that unchecked checkboxes were invisible and checked checkboxes looked strange (like large, empty rectangles).

With this commit, icons are only added for actions that actually have icons, and the checkboxes are thus correctly displayed no matter what theme the user has.

Test Plan

Use the default ‘fusion’ theme. Look in the ‘View’ menus and see that all checkboxes (both checked and unchecked) are visible.

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

Loading