pub struct MarkdownStyle {
pub headings: [HeadingStyle; 6],
pub body_color: Option<Color32>,
pub code_bg: Option<Color32>,
pub blockquote_bar: Option<Color32>,
pub link_color: Option<Color32>,
pub hr_color: Option<Color32>,
pub image_base_uri: String,
}Expand description
Full style configuration for the Markdown renderer.
Fields§
§headings: [HeadingStyle; 6]Heading styles for levels H1-H6 (index 0 = H1).
body_color: Option<Color32>Body text colour (falls back to visuals.text_color() if None).
code_bg: Option<Color32>Code background tint.
blockquote_bar: Option<Color32>Blockquote left-border colour.
link_color: Option<Color32>Link colour.
hr_color: Option<Color32>Horizontal rule colour.
image_base_uri: StringBase URI for resolving relative image paths (e.g. "file:///path/to/dir/").
Implementations§
Source§impl MarkdownStyle
impl MarkdownStyle
Sourcepub fn from_visuals(visuals: &Visuals) -> Self
pub fn from_visuals(visuals: &Visuals) -> Self
Create a default style derived from egui visuals (no heading colours).
Sourcepub fn colored(visuals: &Visuals) -> Self
pub fn colored(visuals: &Visuals) -> Self
Create a style with coloured headings, auto-selecting palette by theme.
Sourcepub fn set_heading_colors(&mut self, colors: [Color32; 6])
pub fn set_heading_colors(&mut self, colors: [Color32; 6])
Set heading colours from an external palette.
Sourcepub fn set_heading_scales(&mut self, scales: [f32; 6])
pub fn set_heading_scales(&mut self, scales: [f32; 6])
Set heading font scales.
Trait Implementations§
Source§impl Clone for MarkdownStyle
impl Clone for MarkdownStyle
Source§fn clone(&self) -> MarkdownStyle
fn clone(&self) -> MarkdownStyle
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 moreAuto Trait Implementations§
impl Freeze for MarkdownStyle
impl RefUnwindSafe for MarkdownStyle
impl Send for MarkdownStyle
impl Sync for MarkdownStyle
impl Unpin for MarkdownStyle
impl UnsafeUnpin for MarkdownStyle
impl UnwindSafe for MarkdownStyle
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