feat: add Ellipsize to widgets
This commit is contained in:
parent
f2ef716ad5
commit
cc670e1966
18 changed files with 181 additions and 9 deletions
|
|
@ -144,6 +144,7 @@ where
|
|||
text_line_height: text::LineHeight,
|
||||
text_shaping: text::Shaping,
|
||||
text_wrapping: text::Wrapping,
|
||||
text_ellipsize: text::Ellipsize,
|
||||
font: Option<Renderer::Font>,
|
||||
class: Theme::Class<'a>,
|
||||
last_status: Option<Status>,
|
||||
|
|
@ -190,6 +191,7 @@ where
|
|||
text_line_height: text::LineHeight::default(),
|
||||
text_shaping: text::Shaping::Advanced,
|
||||
text_wrapping: text::Wrapping::default(),
|
||||
text_ellipsize: text::Ellipsize::default(),
|
||||
font: None,
|
||||
class: Theme::default(),
|
||||
last_status: None,
|
||||
|
|
@ -241,6 +243,12 @@ where
|
|||
self
|
||||
}
|
||||
|
||||
/// Sets the [`text::Ellipsize`] strategy of the [`Radio`] button.
|
||||
pub fn text_ellipsize(mut self, ellipsize: text::Ellipsize) -> Self {
|
||||
self.text_ellipsize = ellipsize;
|
||||
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());
|
||||
|
|
@ -318,6 +326,7 @@ where
|
|||
align_y: alignment::Vertical::Top,
|
||||
shaping: self.text_shaping,
|
||||
wrapping: self.text_wrapping,
|
||||
ellipsize: self.text_ellipsize,
|
||||
},
|
||||
)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue