This commit is contained in:
JMARyA 2025-01-17 17:12:52 +01:00
parent 28fa0f21dc
commit 79f08fd202
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 20 additions and 5 deletions

View file

@ -182,6 +182,21 @@ impl TextWidget {
self
}
#[must_use]
pub fn underlined(self) -> Self {
self.decoration(TextDecoration(DecorationKind::Underline))
}
#[must_use]
pub fn overlined(self) -> Self {
self.decoration(TextDecoration(DecorationKind::Overline))
}
#[must_use]
pub fn strikethrough(self) -> Self {
self.decoration(TextDecoration(DecorationKind::LineThrough))
}
// Weight
#[must_use]
@ -743,7 +758,7 @@ impl LineHeight {
// Decoration
#[allow(non_snake_case)]
pub fn TextDecoration<T: UIWidget + 'static>(kind: DecorationKind) -> DecorationWidget {
pub fn TextDecoration(kind: DecorationKind) -> DecorationWidget {
DecorationWidget {
kind: kind.to_value().to_string(),
color: None,