Add text::Wrapping support
Co-authored-by: Neeraj Jaiswal <neerajj85@gmail.com>
This commit is contained in:
parent
8d826cc662
commit
f98328f4f1
21 changed files with 160 additions and 30 deletions
|
|
@ -82,6 +82,7 @@ where
|
|||
text_size: Option<Pixels>,
|
||||
text_line_height: text::LineHeight,
|
||||
text_shaping: text::Shaping,
|
||||
text_wrapping: text::Wrapping,
|
||||
font: Option<Renderer::Font>,
|
||||
class: Theme::Class<'a>,
|
||||
}
|
||||
|
|
@ -122,10 +123,11 @@ where
|
|||
label: label.into(),
|
||||
width: Length::Shrink,
|
||||
size: Self::DEFAULT_SIZE,
|
||||
spacing: Self::DEFAULT_SPACING, //15
|
||||
spacing: Self::DEFAULT_SPACING,
|
||||
text_size: None,
|
||||
text_line_height: text::LineHeight::default(),
|
||||
text_shaping: text::Shaping::Basic,
|
||||
text_shaping: text::Shaping::default(),
|
||||
text_wrapping: text::Wrapping::default(),
|
||||
font: None,
|
||||
class: Theme::default(),
|
||||
}
|
||||
|
|
@ -170,6 +172,12 @@ where
|
|||
self
|
||||
}
|
||||
|
||||
/// Sets the [`text::Wrapping`] strategy of the [`Radio`] button.
|
||||
pub fn text_wrapping(mut self, wrapping: text::Wrapping) -> Self {
|
||||
self.text_wrapping = wrapping;
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the text font of the [`Radio`] button.
|
||||
pub fn font(mut self, font: impl Into<Renderer::Font>) -> Self {
|
||||
self.font = Some(font.into());
|
||||
|
|
@ -245,6 +253,7 @@ where
|
|||
alignment::Horizontal::Left,
|
||||
alignment::Vertical::Top,
|
||||
self.text_shaping,
|
||||
self.text_wrapping,
|
||||
)
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue