Commit 66d0b0b4 authored by David Redondo's avatar David Redondo 🏎

Don't set a custom palette if we have the same palette as the currently active one

Summary: Caused some icons not be colored correctly

Test Plan: Close KWrite with unsaved changes, all icons should be colored correctly

Reviewers: broulik, ngraham

Reviewed By: broulik, ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D28830
parent 0eaf7627
......@@ -1604,10 +1604,12 @@ namespace Breeze
KIconLoader::global()->setCustomPalette(palette);
}
const QPixmap pixmap = icon.pixmap(size, mode, state);
if (changePalette && activePalette == QPalette()) {
KIconLoader::global()->resetPalette();
} else {
KIconLoader::global()->setCustomPalette(palette);
if (changePalette) {
if (activePalette == QPalette()) {
KIconLoader::global()->resetPalette();
} else {
KIconLoader::global()->setCustomPalette(palette);
}
}
return pixmap;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment