Add padding to text::Span

This commit is contained in:
Héctor Ramón Jiménez 2024-07-28 13:56:39 +02:00
parent f7fe1edcbb
commit 2796a6bc97
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
4 changed files with 57 additions and 12 deletions

View file

@ -262,7 +262,8 @@ pub fn parse<'a>(
.font(Font::MONOSPACE)
.color(Color::WHITE)
.background(color!(0x111111))
.border(border::rounded(2));
.border(border::rounded(2))
.padding(padding::left(2).right(2));
let span = if let Some(link) = link.as_ref() {
span.color(palette.primary).link(link.clone())