fix(theme): eliminate QSS/CFG duplication (#51)
Some checks failed
Build and Test / build (pull_request) Has been cancelled

- Make src/Gui/Stylesheets/KindredCreate.qss the single source of truth
- Generate PreferencePacks QSS copy at build time via configure_file()
- Merge missing preference defaults into PreferencePacks cfg:
  Document (undo, autosave, backup, license), TreeView (PreSelection,
  SyncView, SyncSelection), NotificationArea, OutputWindow recording,
  General (AutoloadModule=ZToolsWorkbench)
- Delete unused resources/preferences/KindredCreate/ directory
- Delete src/Gui/PreferencePacks/KindredCreate/KindredCreate.qss from source
- Update documentation to reflect single QSS location
This commit is contained in:
forbes
2026-02-08 17:41:26 -06:00
parent cf523f1d87
commit 6773ca0dfd
11 changed files with 42 additions and 2764 deletions

View File

@@ -100,17 +100,13 @@ Pure Python workbenches following FreeCAD's addon pattern. Self-contained with `
**Decision:** Superseded by the AttachExtension approach. Only `tangent_to_cylinder` still uses manual placement (requires a vertex reference not currently collected by the UI).
### Phase 4: Theme system -- PARTIAL
### Phase 4: Theme system -- DONE
**Goal:** Theme applies consistently at startup regardless of active workbench.
**Current state:** The Catppuccin Mocha theme is set as the default via the KindredCreate preference pack. Four copies of the QSS file exist and must be kept in sync manually:
1. `resources/preferences/KindredCreate/KindredCreate.qss` (canonical)
2. `src/Gui/Stylesheets/KindredCreate.qss`
3. `src/Gui/PreferencePacks/KindredCreate/KindredCreate.qss`
4. `mods/ztools/CatppuccinMocha/CatppuccinMocha.qss`
**Current state:** The Catppuccin Mocha theme is set as the default via the KindredCreate preference pack. The canonical QSS lives in `src/Gui/Stylesheets/KindredCreate.qss`. The PreferencePacks copy is generated at build time via `configure_file()` in `src/Gui/PreferencePacks/CMakeLists.txt`. The unused `resources/preferences/KindredCreate/` directory has been removed.
**Remaining work:** Eliminate QSS duplication via build-time copy or symlinks. Move theme responsibility out of ztools and into the Create module.
**Remaining work:** Move theme responsibility out of ztools and into the Create module.
### Phase 5: Silo deep integration -- DONE