feat: add Ellipsize to widgets

This commit is contained in:
Hojjat 2026-02-19 09:27:37 -07:00 committed by Ashley Wulber
parent f2ef716ad5
commit cc670e1966
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
18 changed files with 181 additions and 9 deletions

View file

@ -109,6 +109,7 @@ pub struct Checkbox<
text_line_height: text::LineHeight,
text_shaping: text::Shaping,
text_wrapping: text::Wrapping,
text_ellipsize: text::Ellipsize,
font: Option<Renderer::Font>,
icon: Icon<Renderer::Font>,
class: Theme::Class<'a>,
@ -145,6 +146,7 @@ where
text_line_height: text::LineHeight::default(),
text_shaping: text::Shaping::default(),
text_wrapping: text::Wrapping::default(),
text_ellipsize: text::Ellipsize::default(),
font: None,
icon: Icon {
font: Renderer::ICON_FONT,
@ -351,6 +353,7 @@ where
align_y: alignment::Vertical::Top,
shaping: self.text_shaping,
wrapping: self.text_wrapping,
ellipsize: self.text_ellipsize,
},
)
} else {
@ -477,6 +480,7 @@ where
align_y: alignment::Vertical::Center,
shaping: *shaping,
wrapping: text::Wrapping::default(),
ellipsize: text::Ellipsize::default(),
},
bounds.center(),
style.icon_color,