fix
This commit is contained in:
parent
28fa0f21dc
commit
79f08fd202
2 changed files with 20 additions and 5 deletions
|
@ -40,10 +40,10 @@ pub mod prelude {
|
|||
pub use super::primitives::sized::Sized;
|
||||
pub use super::primitives::space::{ScreenValue, SpaceBetween};
|
||||
pub use super::primitives::text::{
|
||||
DecorationKind, DecorationStyle, DecorationThickness, LetterSpacing, LineClamp, LineHeight,
|
||||
ListStyle, NumberStyle, Paragraph, Span, Text, TextAlignment, TextContent, TextDecoration,
|
||||
TextHyphens, TextOverflow, TextTransform, TextWhitespace, TextWordBreak, TextWrap,
|
||||
UnderlineOffset, VerticalTextAlignment,
|
||||
Code, DecorationKind, DecorationStyle, DecorationThickness, LetterSpacing, LineClamp,
|
||||
LineHeight, ListStyle, NumberStyle, Paragraph, Span, Text, TextAlignment, TextContent,
|
||||
TextDecoration, TextHyphens, TextOverflow, TextTransform, TextWhitespace, TextWordBreak,
|
||||
TextWrap, UnderlineOffset, VerticalTextAlignment,
|
||||
};
|
||||
pub use super::primitives::visibility::Visibility;
|
||||
pub use super::primitives::width::{MaxWidth, MinWidth, Width};
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue