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::sized::Sized;
|
||||||
pub use super::primitives::space::{ScreenValue, SpaceBetween};
|
pub use super::primitives::space::{ScreenValue, SpaceBetween};
|
||||||
pub use super::primitives::text::{
|
pub use super::primitives::text::{
|
||||||
DecorationKind, DecorationStyle, DecorationThickness, LetterSpacing, LineClamp, LineHeight,
|
Code, DecorationKind, DecorationStyle, DecorationThickness, LetterSpacing, LineClamp,
|
||||||
ListStyle, NumberStyle, Paragraph, Span, Text, TextAlignment, TextContent, TextDecoration,
|
LineHeight, ListStyle, NumberStyle, Paragraph, Span, Text, TextAlignment, TextContent,
|
||||||
TextHyphens, TextOverflow, TextTransform, TextWhitespace, TextWordBreak, TextWrap,
|
TextDecoration, TextHyphens, TextOverflow, TextTransform, TextWhitespace, TextWordBreak,
|
||||||
UnderlineOffset, VerticalTextAlignment,
|
TextWrap, UnderlineOffset, VerticalTextAlignment,
|
||||||
};
|
};
|
||||||
pub use super::primitives::visibility::Visibility;
|
pub use super::primitives::visibility::Visibility;
|
||||||
pub use super::primitives::width::{MaxWidth, MinWidth, Width};
|
pub use super::primitives::width::{MaxWidth, MinWidth, Width};
|
||||||
|
|
|
@ -182,6 +182,21 @@ impl TextWidget {
|
||||||
self
|
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
|
// Weight
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
|
@ -743,7 +758,7 @@ impl LineHeight {
|
||||||
// Decoration
|
// Decoration
|
||||||
|
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
pub fn TextDecoration<T: UIWidget + 'static>(kind: DecorationKind) -> DecorationWidget {
|
pub fn TextDecoration(kind: DecorationKind) -> DecorationWidget {
|
||||||
DecorationWidget {
|
DecorationWidget {
|
||||||
kind: kind.to_value().to_string(),
|
kind: kind.to_value().to_string(),
|
||||||
color: None,
|
color: None,
|
||||||
|
|
Loading…
Add table
Reference in a new issue