refactor: extract theme from ztools into base distribution (#278) #284

Closed
forbes wants to merge 1 commits from feat/ztools-theme-extraction into main
Owner

Summary

Removes the Catppuccin Mocha theme from ztools and properly integrates Spreadsheet colors into the base KindredCreate preference pack. Leaves ztools as a pure workbench addon.

Key finding

apply_spreadsheet_colors() in ztools was always a no-op: it called SetUnsigned() but the Spreadsheet C++ (SheetModel.cpp:63-67) reads via GetASCII() -- different parameter types. Spreadsheet cells have had black (default) text on the dark theme this whole time.

Changes

src/Gui/PreferencePacks/KindredCreate/KindredCreate.cfg

  • Added Spreadsheet color preferences as FCText entries matching GetASCII():
    • TextColor: #cdd6f4 (text)
    • AliasedCellBackgroundColor: #313244 (surface0)
    • PositiveNumberColor: #a6e3a1 (green)
    • NegativeNumberColor: #f38ba8 (red)

src/Mod/Create/CMakeLists.txt

  • Removed CatppuccinMocha install directive (redundant with KindredCreate)

mods/ztools (submodule)

  • Deleted CatppuccinMocha/ preference pack (stale subset of KindredCreate.qss)
  • Deleted theme.py (generate_stylesheet never called, apply_spreadsheet_colors was no-op)
  • Removed preferencepack declaration from package.xml
  • Cleaned up resources/init.py and InitGui.py

mods/silo (submodule)

  • Updated pointer to latest main (includes merged BOM sync from PR #282)

What stays in ztools

  • icons.py with MOCHA dict and SVG icon definitions (used by 6+ command files)
  • All workbench commands, datums, patterns, pocket tools

Closes #278

## Summary Removes the Catppuccin Mocha theme from ztools and properly integrates Spreadsheet colors into the base KindredCreate preference pack. Leaves ztools as a pure workbench addon. ## Key finding apply_spreadsheet_colors() in ztools was always a no-op: it called SetUnsigned() but the Spreadsheet C++ (SheetModel.cpp:63-67) reads via GetASCII() -- different parameter types. Spreadsheet cells have had black (default) text on the dark theme this whole time. ## Changes ### src/Gui/PreferencePacks/KindredCreate/KindredCreate.cfg - Added Spreadsheet color preferences as FCText entries matching GetASCII(): - TextColor: #cdd6f4 (text) - AliasedCellBackgroundColor: #313244 (surface0) - PositiveNumberColor: #a6e3a1 (green) - NegativeNumberColor: #f38ba8 (red) ### src/Mod/Create/CMakeLists.txt - Removed CatppuccinMocha install directive (redundant with KindredCreate) ### mods/ztools (submodule) - Deleted CatppuccinMocha/ preference pack (stale subset of KindredCreate.qss) - Deleted theme.py (generate_stylesheet never called, apply_spreadsheet_colors was no-op) - Removed preferencepack declaration from package.xml - Cleaned up resources/__init__.py and InitGui.py ### mods/silo (submodule) - Updated pointer to latest main (includes merged BOM sync from PR #282) ### What stays in ztools - icons.py with MOCHA dict and SVG icon definitions (used by 6+ command files) - All workbench commands, datums, patterns, pocket tools Closes #278
forbes added 1 commit 2026-02-19 20:51:34 +00:00
refactor: extract theme from ztools into base distribution (#278)
All checks were successful
Build and Test / build (pull_request) Successful in 29m32s
c527198044
- Add Spreadsheet color preferences to KindredCreate.cfg using FCText
  entries (TextColor, AliasedCellBackgroundColor, PositiveNumberColor,
  NegativeNumberColor) matching the C++ GetASCII() reader in SheetModel.cpp
- Remove CatppuccinMocha install directive from CMakeLists.txt
- Update ztools submodule: theme.py deleted, CatppuccinMocha preference
  pack removed, package.xml cleaned up

The previous apply_spreadsheet_colors() in ztools was a no-op: it called
SetUnsigned() but the Spreadsheet C++ reads GetASCII() — different param
types in FreeCAD's parameter system. Now properly fixed via preference pack.

Closes #278
forbes closed this pull request 2026-02-19 20:52:12 +00:00
All checks were successful
Build and Test / build (pull_request) Successful in 29m32s

Pull request closed

Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#284