Merge pull request 'refactor: migrate to kindred-addon-sdk for theme tokens' (#2) from feat/migrate-to-sdk into main

Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
2026-02-17 17:01:20 +00:00
5 changed files with 26 additions and 35 deletions

View File

@@ -27,13 +27,13 @@
<FCUInt Name="colorError" Value="4086016255"/>
</FCParamGroup>
<FCParamGroup Name="View">
<FCUInt Name="BackgroundColor" Value="505294591"/>
<FCUInt Name="BackgroundColor2" Value="286333951"/>
<FCUInt Name="BackgroundColor3" Value="404235775"/>
<FCUInt Name="BackgroundColor4" Value="825378047"/>
<FCUInt Name="BackgroundColor" Value="404235775"/>
<FCUInt Name="BackgroundColor2" Value="1819313919"/>
<FCUInt Name="BackgroundColor3" Value="1819313919"/>
<FCUInt Name="BackgroundColor4" Value="404235775"/>
<FCBool Name="Simple" Value="0"/>
<FCBool Name="Gradient" Value="1"/>
<FCBool Name="UseBackgroundColorMid" Value="0"/>
<FCBool Name="UseBackgroundColorMid" Value="1"/>
<FCUInt Name="HighlightColor" Value="3416717311"/>
<FCUInt Name="SelectionColor" Value="3032415999"/>
<FCUInt Name="PreselectColor" Value="2497893887"/>

View File

@@ -29,4 +29,18 @@
</preferencepack>
</content>
<!-- Kindred Create extensions -->
<kindred>
<min_create_version>0.1.0</min_create_version>
<load_priority>50</load_priority>
<pure_python>true</pure_python>
<dependencies>
<dependency>sdk</dependency>
</dependencies>
<contexts>
<context id="partdesign.body" action="inject"/>
<context id="partdesign.feature" action="inject"/>
</contexts>
</kindred>
</package>

View File

@@ -1,35 +1,10 @@
# ztools/resources/icons.py
# Catppuccin Mocha themed icons for ztools
# 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",
}
# Catppuccin Mocha Palette — sourced from kindred-addon-sdk
from kindred_sdk.theme import get_theme_tokens
MOCHA = get_theme_tokens()
def _svg_to_base64(svg_content: str) -> str:

View File

@@ -8,7 +8,9 @@
# by Init.py at startup, making it available in:
# Edit > Preferences > General > Stylesheet
from .icons import MOCHA
from kindred_sdk.theme import get_theme_tokens
MOCHA = get_theme_tokens()
# Convenience aliases for commonly used colors
_base = MOCHA["base"]