qlementine icon indicating copy to clipboard operation
qlementine copied to clipboard

When switching theme, update `QPixmapCache`

Open oclero opened this issue 1 year ago • 0 comments

Issue

When switching theme, some icons don't change: those that are created in some QWidget's constructors and set once for all.

Solution

Qt stores all images in QPixmapCache and the key for a given QPixmap is documented (it's a combination of size and more properties). The idea is to replace the QPixmaps directly in the cache by correctly colorized ones (according to theme colors).

oclero avatar Sep 07 '23 08:09 oclero