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
6 changed files with 11 additions and 2831 deletions

View File

@@ -1,109 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<FCParameters>
<FCParamGroup Name="Root">
<FCParamGroup Name="BaseApp">
<FCParamGroup Name="Preferences">
<FCParamGroup Name="Editor">
<FCUInt Name="Text" Value="3453416703"/>
<FCUInt Name="Bookmark" Value="3032415999"/>
<FCUInt Name="Breakpoint" Value="4086016255"/>
<FCUInt Name="Keyword" Value="3416717311"/>
<FCUInt Name="Comment" Value="2139095295"/>
<FCUInt Name="Block comment" Value="2139095295"/>
<FCUInt Name="Number" Value="4206069759"/>
<FCUInt Name="String" Value="2799935999"/>
<FCUInt Name="Character" Value="4073902335"/>
<FCUInt Name="Class name" Value="2310339327"/>
<FCUInt Name="Define name" Value="2310339327"/>
<FCUInt Name="Operator" Value="2312199935"/>
<FCUInt Name="Python output" Value="2796290303"/>
<FCUInt Name="Python error" Value="4086016255"/>
<FCUInt Name="Current line highlight" Value="1162304255"/>
</FCParamGroup>
<FCParamGroup Name="OutputWindow">
<FCUInt Name="colorText" Value="3453416703"/>
<FCUInt Name="colorLogging" Value="2497893887"/>
<FCUInt Name="colorWarning" Value="4192382975"/>
<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"/>
<FCBool Name="Simple" Value="0"/>
<FCBool Name="Gradient" Value="1"/>
<FCBool Name="UseBackgroundColorMid" Value="0"/>
<FCUInt Name="HighlightColor" Value="3416717311"/>
<FCUInt Name="SelectionColor" Value="3032415999"/>
<FCUInt Name="PreselectColor" Value="2497893887"/>
<FCUInt Name="DefaultShapeColor" Value="1482387711"/>
<FCBool Name="RandomColor" Value="0"/>
<FCUInt Name="DefaultShapeLineColor" Value="2470768383"/>
<FCUInt Name="DefaultShapeVertexColor" Value="2470768383"/>
<FCUInt Name="BoundingBoxColor" Value="1819509759"/>
<FCUInt Name="AnnotationTextColor" Value="3453416703"/>
<FCUInt Name="SketchEdgeColor" Value="3453416703"/>
<FCUInt Name="SketchVertexColor" Value="3453416703"/>
<FCUInt Name="EditedEdgeColor" Value="3416717311"/>
<FCUInt Name="EditedVertexColor" Value="4123402495"/>
<FCUInt Name="ConstructionColor" Value="4206069759"/>
<FCUInt Name="ExternalColor" Value="4192382975"/>
<FCUInt Name="FullyConstrainedColor" Value="2799935999"/>
<FCUInt Name="InternalAlignedGeoColor" Value="1959907071"/>
<FCUInt Name="FullyConstraintElementColor" Value="2799935999"/>
<FCUInt Name="FullyConstraintConstructionElementColor" Value="2497893887"/>
<FCUInt Name="FullyConstraintInternalAlignmentColor" Value="2312199935"/>
<FCUInt Name="FullyConstraintConstructionPointColor" Value="2799935999"/>
<FCUInt Name="ConstrainedIcoColor" Value="2310339327"/>
<FCUInt Name="NonDrivingConstrDimColor" Value="2139095295"/>
<FCUInt Name="ConstrainedDimColor" Value="3416717311"/>
<FCUInt Name="ExprBasedConstrDimColor" Value="4206069759"/>
<FCUInt Name="DeactivatedConstrDimColor" Value="1819509759"/>
<FCUInt Name="CursorTextColor" Value="3453416703"/>
<FCUInt Name="CursorCrosshairColor" Value="3416717311"/>
<FCUInt Name="CreateLineColor" Value="2799935999"/>
<FCUInt Name="ShadowLightColor" Value="2470768128"/>
<FCUInt Name="ShadowGroundColor" Value="286333952"/>
<FCUInt Name="HiddenLineColor" Value="825378047"/>
<FCUInt Name="HiddenLineFaceColor" Value="505294591"/>
<FCUInt Name="HiddenLineBackground" Value="505294591"/>
<FCBool Name="EnableBacklight" Value="1"/>
<FCUInt Name="BacklightColor" Value="1162304255"/>
<FCFloat Name="BacklightIntensity" Value="0.30"/>
</FCParamGroup>
<FCParamGroup Name="TreeView">
<FCUInt Name="TreeEditColor" Value="3416717311"/>
<FCUInt Name="TreeActiveColor" Value="2799935999"/>
</FCParamGroup>
<FCParamGroup Name="MainWindow">
<FCText Name="StyleSheet">CatppuccinMocha.qss</FCText>
</FCParamGroup>
<FCParamGroup Name="Mod">
<FCParamGroup Name="Start">
<FCUInt Name="BackgroundColor1" Value="404235775"/>
<FCUInt Name="BackgroundTextColor" Value="3453416703"/>
<FCUInt Name="PageColor" Value="505294591"/>
<FCUInt Name="PageTextColor" Value="3453416703"/>
<FCUInt Name="BoxColor" Value="825378047"/>
<FCUInt Name="LinkColor" Value="2310339327"/>
<FCUInt Name="BackgroundColor2" Value="286333951"/>
</FCParamGroup>
<FCParamGroup Name="Part">
<FCUInt Name="VertexColor" Value="3032415999"/>
<FCUInt Name="EdgeColor" Value="2310339327"/>
</FCParamGroup>
<FCParamGroup Name="PartDesign">
<FCUInt Name="DefaultDatumColor" Value="3416717311"/>
</FCParamGroup>
<FCParamGroup Name="Draft">
<FCUInt Name="snapcolor" Value="2799935999"/>
</FCParamGroup>
<FCParamGroup Name="Sketcher">
<FCUInt Name="GridLineColor" Value="1162304255"/>
</FCParamGroup>
</FCParamGroup>
</FCParamGroup>
</FCParamGroup>
</FCParamGroup>
</FCParameters>

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
<name>ZTools</name> <name>ZTools</name>
<description>Extended PartDesign workbench with velocity-focused tools, advanced datum creation, and Catppuccin Mocha theme.</description> <description>Extended PartDesign workbench with velocity-focused tools and advanced datum creation.</description>
<version>0.1.0</version> <version>0.1.0</version>
@@ -17,16 +17,16 @@
<classname>ZToolsWorkbench</classname> <classname>ZToolsWorkbench</classname>
<subdirectory>./ztools</subdirectory> <subdirectory>./ztools</subdirectory>
</workbench> </workbench>
<preferencepack>
<name>CatppuccinMocha</name>
<description>Catppuccin Mocha dark theme - soothing pastel colors for the high-spirited</description>
<subdirectory>./CatppuccinMocha</subdirectory>
<tag>color</tag>
<tag>dark</tag>
<tag>catppuccin</tag>
<tag>mocha</tag>
<tag>theme</tag>
</preferencepack>
</content> </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>
</kindred>
</package> </package>

View File

@@ -305,14 +305,6 @@ class ZToolsWorkbench(Gui.Workbench):
def Activated(self): def Activated(self):
"""Called when workbench is activated.""" """Called when workbench is activated."""
# Apply Catppuccin Mocha colors to Spreadsheet preferences
try:
from ztools.resources.theme import apply_spreadsheet_colors
apply_spreadsheet_colors()
except Exception as e:
App.Console.PrintWarning(f"Could not apply spreadsheet colors: {e}\n")
App.Console.PrintMessage("ztools workbench activated\n") App.Console.PrintMessage("ztools workbench activated\n")
def Deactivated(self): def Deactivated(self):

View File

@@ -1,10 +1,8 @@
# ztools/resources - Icons and assets # ztools/resources - Icons and assets
from .icons import MOCHA, get_icon, save_icons_to_disk from .icons import MOCHA, get_icon, save_icons_to_disk
from .theme import get_stylesheet
__all__ = [ __all__ = [
"get_icon", "get_icon",
"save_icons_to_disk", "save_icons_to_disk",
"MOCHA", "MOCHA",
"get_stylesheet",
] ]

File diff suppressed because it is too large Load Diff