Summary: | Monochrome icons in Kickoff and Kicker have wrong colors with mismatched Plasma and app color schemes | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Nate Graham <nate> |
Component: | Application Launcher (Kickoff) widget | Assignee: | Nate Graham <nate> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mikel5764, noahadvs |
Priority: | NOR | Keywords: | qt6, regression |
Version First Reported In: | master | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/-/commit/f6628194399d3347c328732ffbf79f601ff7e89c | Version Fixed In: | |
Sentry Crash Report: |
Description
Nate Graham
2023-08-01 04:24:02 UTC
Strangely the colors of monochrome icons are correct when they appear in the search view; they're only wrong in the browse views. Kicker is also affected; looks like the problem is in the model, with whatever provides the "Decoration" role. It looks like the various models return instances of QIcon using QIcon::fromTheme(), which is then handed off the Kirigami.Icon. Either Kirigami.Icon is not able to color-change them properly, or else the design of returning a QIcon is itself flawed and we should always return an icon name or absolute file path, and count on Kirigami.Icon to handle those appropriately. Ok, I think I've fixed it. Patch incoming soon. A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3233 Git commit f6628194399d3347c328732ffbf79f601ff7e89c by Nate Graham. Committed on 31/08/2023 at 00:24. Pushed by ngraham into branch 'master'. Don't return QIcons for Kicker models When the models return QIcons, the result is icon data that's recolored by KIconLoader according to the system color scheme. However these returned QIcons may be displayed by Kirigami.Icon instances in Kickoff and other applets using a different Plasma color scheme from the systemwide one, and then the icons will be colored incorrectly. We can fix the issue by removing usages of QIcon and instead returning the icon names or file paths directly; Kirigami.Icon can handle them both internally and perform the recoloring correctly for all plasma and systemwide colorscheme combinations. M +2 -2 applets/kicker/plugin/abstractentry.cpp M +1 -2 applets/kicker/plugin/abstractentry.h M +5 -22 applets/kicker/plugin/appentry.cpp M +4 -4 applets/kicker/plugin/appentry.h M +1 -2 applets/kicker/plugin/computermodel.cpp M +3 -3 applets/kicker/plugin/fileentry.cpp M +1 -1 applets/kicker/plugin/fileentry.h M +1 -2 applets/kicker/plugin/recentusagemodel.cpp M +2 -2 applets/kicker/plugin/rootmodel.cpp M +1 -1 applets/kicker/plugin/rootmodel.h M +0 -1 applets/kicker/plugin/runnermatchesmodel.cpp M +2 -2 applets/kicker/plugin/simplefavoritesmodel.cpp M +3 -3 applets/kicker/plugin/systementry.cpp M +1 -1 applets/kicker/plugin/systementry.h https://invent.kde.org/plasma/plasma-workspace/-/commit/f6628194399d3347c328732ffbf79f601ff7e89c |