pub struct ThemeContract {Show 15 fields
pub canvas_bg: String,
pub grid_color: String,
pub selection_accent: String,
pub smart_guide_color: String,
pub panel_bg: String,
pub panel_border: String,
pub text_primary: String,
pub text_secondary: String,
pub accent: String,
pub placeholder_border: String,
pub placeholder_bg: String,
pub placeholder_text: String,
pub font_family: String,
pub font_size_base: f32,
pub border_radius: f32,
}Expand description
Platform-agnostic theme contract.
Defines all visual constants that must be consistent across platforms.
The Rust renderer (render2d.rs) derives CanvasTheme from this.
JavaScript hosts consume it via get_theme_json() WASM API.
Fields§
§canvas_bg: StringCanvas background color (the drawing surface)
grid_color: StringGrid overlay color (dots/lines)
selection_accent: StringSelection highlight accent (handle dots, selection box)
smart_guide_color: StringSmart guide line color
panel_bg: StringPanel background (layers, properties, toolbar)
panel_border: StringPanel border / separator color
text_primary: StringPrimary text color (labels, headings)
text_secondary: StringSecondary text color (captions, hints)
accent: StringPrimary accent color (buttons, links, active states)
placeholder_border: StringGeneric node placeholder border
placeholder_bg: StringGeneric node placeholder background
placeholder_text: StringGeneric node placeholder text
font_family: StringDefault font family stack
font_size_base: f32Base font size in px
border_radius: f32Default border radius in px
Implementations§
Trait Implementations§
Source§impl Clone for ThemeContract
impl Clone for ThemeContract
Source§fn clone(&self) -> ThemeContract
fn clone(&self) -> ThemeContract
Returns a duplicate of the value. Read more
1.0.0 · 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 ThemeContract
impl Debug for ThemeContract
Source§impl<'de> Deserialize<'de> for ThemeContract
impl<'de> Deserialize<'de> for ThemeContract
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ThemeContract
impl PartialEq for ThemeContract
Source§impl Serialize for ThemeContract
impl Serialize for ThemeContract
impl StructuralPartialEq for ThemeContract
Auto Trait Implementations§
impl Freeze for ThemeContract
impl RefUnwindSafe for ThemeContract
impl Send for ThemeContract
impl Sync for ThemeContract
impl Unpin for ThemeContract
impl UnsafeUnpin for ThemeContract
impl UnwindSafe for ThemeContract
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