qlementine
qlementine copied to clipboard
When switching theme, update `QPixmapCache`
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).