Skip to content

Improving KisIconWidget icon handling

Alvin Wong requested to merge alvinwong/krita:alvin/iconwidget-painting into master

Some changes to KisIconWidget:

  • Use QStylePainter to paint the thumbnail icon in QToolButton's style instead of painting over QToolButton's painting. This makes the icon follow the general style, e.g. turns grey when button is disabled.
  • Cache the icon pixmap, instead of regenerating it on every paintEvent.

Test Plan

Check that the gradient and brush editor buttons look fine.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • n/a 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