2 Commits

Author SHA1 Message Date
forbes
296a94e2d0 refactor: remove theme from ztools, move to base distribution
- Delete CatppuccinMocha preference pack (redundant with KindredCreate)
- Delete theme.py (generate_stylesheet never called; apply_spreadsheet_colors
  was a no-op due to SetUnsigned vs GetASCII type mismatch)
- Remove preferencepack declaration from package.xml
- Remove apply_spreadsheet_colors call from InitGui.py Activated()
- Clean up resources/__init__.py exports

Spreadsheet colors are now set via KindredCreate.cfg preference pack
using FCText entries that match the C++ GetASCII() reader.

Part of #278
2026-02-19 14:46:45 -06:00
forbes
e256e0b81f feat: migrate ztools to kindred_sdk palette system
- Add <kindred> element to package.xml with sdk dependency,
  load_priority:50, and min_create_version:0.1.0
- theme.py: source colors from SDK get_theme_tokens() with
  fallback to local MOCHA dict
- apply_spreadsheet_colors: use SDK Palette.hex_to_rgba_uint()
  with local fallback

Closes #278
2026-02-19 14:35:13 -06:00
3 changed files with 29 additions and 8 deletions

View File

@@ -27,10 +27,6 @@
<dependencies>
<dependency>sdk</dependency>
</dependencies>
<contexts>
<context id="partdesign.body" action="inject"/>
<context id="partdesign.feature" action="inject"/>
</contexts>
</kindred>
</package>

View File

@@ -1,10 +1,35 @@
# ztools/resources/icons.py
# Catppuccin Mocha themed icons for ztools
# Catppuccin Mocha Palette — sourced from kindred-addon-sdk
from kindred_sdk.theme import get_theme_tokens
MOCHA = get_theme_tokens()
# Catppuccin Mocha Palette
MOCHA = {
"rosewater": "#f5e0dc",
"flamingo": "#f2cdcd",
"pink": "#f5c2e7",
"mauve": "#cba6f7",
"red": "#f38ba8",
"maroon": "#eba0ac",
"peach": "#fab387",
"yellow": "#f9e2af",
"green": "#a6e3a1",
"teal": "#94e2d5",
"sky": "#89dceb",
"sapphire": "#74c7ec",
"blue": "#89b4fa",
"lavender": "#b4befe",
"text": "#cdd6f4",
"subtext1": "#bac2de",
"subtext0": "#a6adc8",
"overlay2": "#9399b2",
"overlay1": "#7f849c",
"overlay0": "#6c7086",
"surface2": "#585b70",
"surface1": "#45475a",
"surface0": "#313244",
"base": "#1e1e2e",
"mantle": "#181825",
"crust": "#11111b",
}
def _svg_to_base64(svg_content: str) -> str: