Make RichText generic over data structure
... and decouple `markdown::parse` from theming
This commit is contained in:
parent
55764b923e
commit
4c883f12b4
7 changed files with 223 additions and 94 deletions
|
|
@ -32,7 +32,7 @@ use crate::{Pixels, Size};
|
|||
/// let widget = Widget::new().padding(20); // 20px on all sides
|
||||
/// let widget = Widget::new().padding([10, 20]); // top/bottom, left/right
|
||||
/// ```
|
||||
#[derive(Debug, Copy, Clone, Default)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Default)]
|
||||
pub struct Padding {
|
||||
/// Top padding
|
||||
pub top: f32,
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ pub struct Span<'a, Link = (), Font = crate::Font> {
|
|||
}
|
||||
|
||||
/// A text highlight.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct Highlight {
|
||||
/// The [`Background`] of the highlight.
|
||||
pub background: Background,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue