pub struct RichTextStyle {
pub body_color: Option<Hsla>,
pub muted_color: Option<Hsla>,
pub link_color: Option<Hsla>,
pub selection_color: Option<Hsla>,
pub code_background: Option<Hsla>,
pub code_color: Option<Hsla>,
pub border_color: Option<Hsla>,
pub blockquote_border_color: Option<Hsla>,
pub table_row_hover: Option<Hsla>,
pub paragraph_gap: Option<Rems>,
pub code_font_family: Option<SharedString>,
}Expand description
Per-instance style overrides for RichText. Unset fields project automatically
from the active window or ThemeScope MaterialTheme.
Fields§
§body_color: Option<Hsla>Body text color (defaults to OnSurface).
muted_color: Option<Hsla>Secondary/muted text color (defaults to OnSurfaceVariant).
link_color: Option<Hsla>Hyperlink color (defaults to Primary).
selection_color: Option<Hsla>Text selection highlight color (defaults to translucent PrimaryContainer).
code_background: Option<Hsla>Background for fenced code blocks and inline code spans (defaults to SurfaceContainerHighest).
code_color: Option<Hsla>Foreground for code spans and code blocks (defaults to OnSurface).
border_color: Option<Hsla>Horizontal rule and table border color (defaults to OutlineVariant).
blockquote_border_color: Option<Hsla>Leading accent bar color for blockquotes (defaults to OutlineVariant).
table_row_hover: Option<Hsla>Hovered table row tint (defaults to SurfaceContainerLow).
paragraph_gap: Option<Rems>Vertical spacing between paragraphs (defaults to 0.75 rem).
code_font_family: Option<SharedString>Optional monospace font family override for code spans and blocks.
Trait Implementations§
Source§impl Clone for RichTextStyle
impl Clone for RichTextStyle
Source§fn clone(&self) -> RichTextStyle
fn clone(&self) -> RichTextStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RichTextStyle
impl Debug for RichTextStyle
Source§impl Default for RichTextStyle
impl Default for RichTextStyle
Source§fn default() -> RichTextStyle
fn default() -> RichTextStyle
Source§impl PartialEq for RichTextStyle
impl PartialEq for RichTextStyle
impl StructuralPartialEq for RichTextStyle
Auto Trait Implementations§
impl Forget for RichTextStyle
impl Freeze for RichTextStyle
impl Move for RichTextStyle
impl RefUnwindSafe for RichTextStyle
impl Send for RichTextStyle
impl Sync for RichTextStyle
impl Unpin for RichTextStyle
impl UnsafeUnpin for RichTextStylewhere
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
impl UnwindSafe for RichTextStyle
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
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> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().