Skip to content

Create GuiUtils functions createColorIcon() and createOpacityIcon()

  • createColorIcon creates a QIcon which visualizes the given colors using rectangles. A background icon can be provided, in that case only the lowest 25% of the icon will be filled by the rectangles.
  • createOpacityIcon creates a QIcon that visualizes a given opacity using the current foreground color and a checkerboard background.

These functions are now used in place of colorIcon, colorPicerIcon, opacityIcon in AnnotationActionHandler. The new functions have some advantages: support most common icon sizes, and dark color schemes.

This replaces !223 (closed).

Screenshots (before/after; 131.25% screen scale, 48px toolbar size)





Merge request reports