Expand description
Style definitions for NodeGraph visual customization.
This module provides style types for customizing the appearance of nodes, edges, and the overall graph canvas.
§Config vs Style
- Config types (
NodeConfig,EdgeConfig, etc.) useOption<T>fields for partial overrides. Usemerge()to combine configs. - Style types (
NodeStyle,EdgeStyle, etc.) have concrete values and are resolved from Config + Theme at render time viafrom_theme().
Edge and node styling uses iced_sdf::Pattern for stroke patterns (solid,
dashed, dotted, arrowed) and iced_sdf::Layer for composited rendering.
Structs§
- Edge
Border - Border ring around edge stroke.
- Edge
Config - Edge configuration for connection lines.
- Edge
Shadow - Shadow style for edges.
- Edge
Style - Style configuration for edges using iced_sdf Pattern and Layer.
- Graph
Config - Graph configuration for canvas and background.
- Graph
Style - Complete graph style configuration.
- Node
Border - Border style for nodes using iced_sdf Pattern.
- Node
Config - Partial node configuration for cascading style overrides.
- Node
Shadow - Shadow configuration for nodes.
- Node
Style - Style configuration for a node’s visual appearance.
- PinConfig
- Pin configuration for connection points.
- PinStyle
- Style configuration for pins.
- Selection
Config - Selection style configuration.
- Selection
Style - Style configuration for node selection and hover highlighting.
- Shadow
Config - Shadow configuration for node drop shadows.
Enums§
- Edge
Curve - Edge path curve type determining the shape of the connection.
- Edge
Status - Edge status for styling purposes.
- Node
Status - Node status for styling purposes.
- PinShape
- Shape of a pin indicator.
- PinStatus
- Pin status for styling purposes.
Constants§
- STANDARD_
THEMES - All standard iced themes for easy enumeration in UI.
Functions§
- blend
- Blends two colors together.
- darken
- Darkens a color by mixing with black.
- is_
dark_ theme - Determines if a theme is dark based on text color luminance.
- lighten
- Lightens a color by mixing with white.
- relative_
luminance - Calculates relative luminance of a color using WCAG 2.0 formula. See: https://www.w3.org/TR/WCAG20/#relativeluminancedef
- theme_
name - Returns the display name of a theme.
- with_
alpha - Creates a semi-transparent version of a color.
Type Aliases§
- Edge
Style Fn - Style callback for edges.
- Node
Style Fn - Style callback for nodes.
- PinStyle
Fn - Style callback for pins.