pub struct TextStyle {
pub bold: bool,
pub italic: bool,
pub underline: bool,
pub strikethrough: bool,
pub monospace: bool,
pub scale: Option<f32>,
pub fg_color: Option<Color>,
pub bg_color: Option<Color>,
pub link: Option<String>,
pub dimmed: bool,
pub paragraph_indent: u32,
}Expand description
Visual and semantic style attributes for a text run in a rich text widget.
Fields§
§bold: bool§italic: bool§underline: bool§strikethrough: bool§monospace: bool§scale: Option<f32>§fg_color: Option<Color>§bg_color: Option<Color>§link: Option<String>§dimmed: bool§paragraph_indent: u32Implementations§
Source§impl TextStyle
impl TextStyle
Sourcepub const fn strikethrough(self, strikethrough: bool) -> Self
pub const fn strikethrough(self, strikethrough: bool) -> Self
Sets strikethrough styling.
Sourcepub const fn scale(self, scale: f32) -> Self
pub const fn scale(self, scale: f32) -> Self
Sets relative font scale (1.0 = normal body size).
Sourcepub const fn paragraph_indent(self, indent: u32) -> Self
pub const fn paragraph_indent(self, indent: u32) -> Self
Sets paragraph indentation level.
Trait Implementations§
impl StructuralPartialEq for TextStyle
Auto Trait Implementations§
impl Forget for TextStyle
impl Freeze for TextStyle
impl Move for TextStyle
impl RefUnwindSafe for TextStyle
impl Send for TextStylewhere
RawVecInner: Send,
impl Sync for TextStylewhere
RawVecInner: Sync,
impl Unpin for TextStyle
impl UnsafeUnpin for TextStyle
impl UnwindSafe for TextStylewhere
RawVecInner: UnwindSafe,
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