We can colorize icons based on the user's palette, so clear the pixmap cache when it changes.
Differential Revision: https://phabricator.kde.org/D3937
bool KStandardItemListWidget::event(QEvent *event)
{
- if (event->type() == QEvent::WindowDeactivate || event->type() == QEvent::WindowActivate) {
+ if (event->type() == QEvent::WindowDeactivate || event->type() == QEvent::WindowActivate
+ || event->type() == QEvent::PaletteChange) {
m_dirtyContent = true;
}
#include <QGraphicsSceneDragDropEvent>
#include <QTimer>
#include <QScrollBar>
+#include <QPixmapCache>
#include <QPointer>
#include <QMenu>
#include <QVBoxLayout>
switch (event->type()) {
case QEvent::PaletteChange:
updatePalette();
+ QPixmapCache::clear();
break;
case QEvent::KeyPress: