pub struct GraphStyle {
pub card_bg: Rgba,
pub card_border: Rgba,
pub card_border_selected: Rgba,
pub card_title: Rgba,
pub badge: Rgba,
pub edge: Rgba,
pub edge_broken: Rgba,
pub edge_label: Rgba,
pub notice: Rgba,
pub kind_accents: Vec<(String, Rgba)>,
}Expand description
Resolved ink set for the view (the widget token rule: callers
resolve theme tokens into plain Rgba; the view invents no
colors). Author-written, shape-stable: plain fields + Default
(derived from the default theme) + FRU per ADR-0003 §2.
Fields§
§card_bg: RgbaCard fill.
card_border: RgbaCard border ink.
card_border_selected: RgbaBorder ink of the SELECTED card (the restyle).
card_title: RgbaTitle ink.
badge: RgbaBadge ink.
edge: RgbaEdge stroke ink.
edge_broken: RgbaInk of cycle-broken edges (the honesty marker; broken edges also render dotted).
edge_label: RgbaEdge midpoint-label ink.
notice: RgbaFallback notice line ink.
kind_accents: Vec<(String, Rgba)>Kind -> accent ink for the card’s left border column (exact
string match on NodeDesc::kind; unknown kinds stay plain).
Implementations§
Source§impl GraphStyle
impl GraphStyle
Sourcepub fn from_tokens(t: &TokenSet) -> GraphStyle
pub fn from_tokens(t: &TokenSet) -> GraphStyle
Derive the default ink set from a resolved token set.
Sourcepub fn kind_accent(self, kind: impl Into<String>, ink: Rgba) -> GraphStyle
pub fn kind_accent(self, kind: impl Into<String>, ink: Rgba) -> GraphStyle
Map a node kind to an accent ink (builder style).
Trait Implementations§
Source§impl Clone for GraphStyle
impl Clone for GraphStyle
Source§fn clone(&self) -> GraphStyle
fn clone(&self) -> GraphStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphStyle
impl Debug for GraphStyle
Source§impl Default for GraphStyle
impl Default for GraphStyle
Source§impl PartialEq for GraphStyle
impl PartialEq for GraphStyle
impl StructuralPartialEq for GraphStyle
Auto Trait Implementations§
impl Freeze for GraphStyle
impl RefUnwindSafe for GraphStyle
impl Send for GraphStyle
impl Sync for GraphStyle
impl Unpin for GraphStyle
impl UnsafeUnpin for GraphStyle
impl UnwindSafe for GraphStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more