pub struct NodeContentStyle {
pub title_background: Color,
pub title_text: Color,
pub body_background: Color,
pub body_text: Color,
pub accent: Color,
pub corner_radius: f32,
pub border_width: f32,
}Expand description
Theme-derived color palette for a node’s interior.
Provides color palettes derived from the current theme for consistent node interior styling, plus geometry values for title bars and content containers.
Fields§
§title_background: ColorBackground color for the title bar area
title_text: ColorText color for the title
body_background: ColorBackground color for the node body
body_text: ColorText color for body content
accent: ColorAccent color for highlights and decorations
corner_radius: f32Corner radius of the node (for title bar and content container)
border_width: f32Border width of the node (for inset calculations)
Implementations§
Source§impl NodeContentStyle
impl NodeContentStyle
Sourcepub fn with_geometry(self, corner_radius: f32, border_width: f32) -> Self
pub fn with_geometry(self, corner_radius: f32, border_width: f32) -> Self
Sets the corner radius for this style.
Sourcepub fn input(theme: &Theme) -> Self
pub fn input(theme: &Theme) -> Self
Creates an input node style derived from theme’s primary color.
Sourcepub fn process(theme: &Theme) -> Self
pub fn process(theme: &Theme) -> Self
Creates a process node style derived from theme’s success color.
Sourcepub fn output(theme: &Theme) -> Self
pub fn output(theme: &Theme) -> Self
Creates an output node style derived from theme’s secondary color.
Trait Implementations§
Source§impl Clone for NodeContentStyle
impl Clone for NodeContentStyle
Source§fn clone(&self) -> NodeContentStyle
fn clone(&self) -> NodeContentStyle
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 moreAuto Trait Implementations§
impl Freeze for NodeContentStyle
impl RefUnwindSafe for NodeContentStyle
impl Send for NodeContentStyle
impl Sync for NodeContentStyle
impl Unpin for NodeContentStyle
impl UnsafeUnpin for NodeContentStyle
impl UnwindSafe for NodeContentStyle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.