Skip to content

Skip icon CSS generation without global theming - #26

Merged
IgKh merged 2 commits into
IgKh:masterfrom
amozeo:fix/icon-css-null-palette
Jul 26, 2026
Merged

IgKh merged 2 commits into
IgKh:masterfrom
amozeo:fix/icon-css-null-palette

Conversation

@amozeo

@amozeo amozeo commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Fixes a null pointer dereference when global theme application is disabled.

Without this guard, Qt applications loading the CuteCosmic platform theme segfault during startup when global theme application is disabled.

Fixes a null pointer dereference when global theme application is disabled.
@IgKh

IgKh commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Good catch, thanks!

However, the fix as it is now is problematic. Breeze icons still need to be re-colored, even if other toolkit theming is disabled. Dark mode is still applied to some supporting styles (e.g. Fusion), and in such cases not re-coloring symbolic icons will lead to dark-on-dark icons.

If we don't have our palette created, the CSS can be generated from the effective application palette, which will take the active style's standard palette into consideration. But it is calculated only after the platform theme finishes its turn, so just using it in CuteCosmicColorManager::rebuildKdeIconCss is too early. Perhaps the KDE icon CSS should be created lazily on first use after each theme reset.

Would you be OK with expanding the patch to that degree, or would you prefer me to do that?

@amozeo

amozeo commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

I prefer to you to do that. I'm not confident in expanding the patch with additional requirement to recolorize with application color theme when the cosmic global theme application is disabled, myself.

@IgKh

IgKh commented Jul 26, 2026

Copy link
Copy Markdown
Owner

No worries. Still, thanks a lot for spotting and identifying the issue!

@IgKh
IgKh merged commit 27d816d into IgKh:master Jul 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants