Module style

Module style 

Source
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.) use Option<T> fields for partial overrides. Use merge() to combine configs.
  • Style types (NodeStyle, EdgeStyle, etc.) have concrete values and are resolved from Config + Theme at render time via from_theme().

Edge and node styling uses iced_sdf::Pattern for stroke patterns (solid, dashed, dotted, arrowed) and iced_sdf::Layer for composited rendering.

Structs§

EdgeBorder
Border ring around edge stroke.
EdgeConfig
Edge configuration for connection lines.
EdgeShadow
Shadow style for edges.
EdgeStyle
Style configuration for edges using iced_sdf Pattern and Layer.
GraphConfig
Graph configuration for canvas and background.
GraphStyle
Complete graph style configuration.
NodeBorder
Border style for nodes using iced_sdf Pattern.
NodeConfig
Partial node configuration for cascading style overrides.
NodeShadow
Shadow configuration for nodes.
NodeStyle
Style configuration for a node’s visual appearance.
PinConfig
Pin configuration for connection points.
PinStyle
Style configuration for pins.
SelectionConfig
Selection style configuration.
SelectionStyle
Style configuration for node selection and hover highlighting.
ShadowConfig
Shadow configuration for node drop shadows.

Enums§

EdgeCurve
Edge path curve type determining the shape of the connection.
EdgeStatus
Edge status for styling purposes.
NodeStatus
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§

EdgeStyleFn
Style callback for edges.
NodeStyleFn
Style callback for nodes.
PinStyleFn
Style callback for pins.