feat(sdk): C++ theme engine #353

Closed
opened 2026-02-27 19:30:33 +00:00 by forbes · 0 comments
Owner

Goal

Palette/token lookup available in C++ so widgets can query theme colors without Python round-trips.

New files

  • src/Gui/SDK/ThemeEngine.h/.cpp — C++ YAML palette loading, get_color(token), format_qss(template), singleton with cache

Modified files

  • src/Gui/SDK/bindings/kcsdk_py.cpp — Bind theme_tokens(), theme_color(), format_qss()
  • mods/sdk/kindred_sdk/theme.py — Optionally delegate to kcsdk.theme_tokens(), keep YAML fallback for console mode

Verification

kcsdk.theme_color("blue") returns "#89b4fa", kcsdk.format_qss("{blue}") substitutes correctly.

Depends on #350. Part of the KCSDK epic (#346). Phase 4 of 8.

## Goal Palette/token lookup available in C++ so widgets can query theme colors without Python round-trips. ## New files - `src/Gui/SDK/ThemeEngine.h/.cpp` — C++ YAML palette loading, `get_color(token)`, `format_qss(template)`, singleton with cache ## Modified files - `src/Gui/SDK/bindings/kcsdk_py.cpp` — Bind `theme_tokens()`, `theme_color()`, `format_qss()` - `mods/sdk/kindred_sdk/theme.py` — Optionally delegate to `kcsdk.theme_tokens()`, keep YAML fallback for console mode ## Verification `kcsdk.theme_color("blue")` returns `"#89b4fa"`, `kcsdk.format_qss("{blue}")` substitutes correctly. Depends on #350. Part of the KCSDK epic (#346). Phase 4 of 8.
forbes added the enhancement label 2026-02-27 19:30:33 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#353