Skip to content

Commit 873db89

Browse files
committed
Refine SkeletonStyle config fields
Update `SkeletonStyle` to support explicit visibility and clearer naming (`color_mode`, `color_bgr`), and switch numeric styling options to constrained `Field` definitions for validated thickness and gradient step ranges.
1 parent a47a748 commit 873db89

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎dlclivegui/config.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -507,10 +507,11 @@ class SkeletonColorMode(str, Enum):
507507

508508

509509
class SkeletonStyle(BaseModel):
510-
mode: SkeletonColorMode = SkeletonColorMode.SOLID
511-
color: BGR = (0, 255, 255) # default if SOLID
512-
thickness: int = 2 # base thickness in pixels
513-
gradient_steps: int = 16 # segments per edge when gradient
510+
visible: bool = False
511+
color_mode: SkeletonColorMode = SkeletonColorMode.SOLID
512+
color_bgr: BGR = (0, 255, 255) # default if SOLID
513+
thickness: int = Field(defalt=2, ge=1, le=20) # base thickness in pixels
514+
gradient_steps: int = Field(default=16, ge=2, le=128) # segments per edge when gradient
514515
scale_with_zoom: bool = True # scale thickness with (sx, sy)
515516

516517
def effective_thickness(self, sx: float, sy: float) -> int:

0 commit comments

Comments
 (0)