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)
{
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) {
#include <QGraphicsSceneDragDropEvent>
#include <QTimer>
#include <QScrollBar>
#include <QGraphicsSceneDragDropEvent>
#include <QTimer>
#include <QScrollBar>
#include <QPointer>
#include <QMenu>
#include <QVBoxLayout>
#include <QPointer>
#include <QMenu>
#include <QVBoxLayout>
switch (event->type()) {
case QEvent::PaletteChange:
updatePalette();
switch (event->type()) {
case QEvent::PaletteChange:
updatePalette();
break;
case QEvent::KeyPress:
break;
case QEvent::KeyPress: