feat(segmented_button): add ellipsize support
This commit is contained in:
parent
7a56762422
commit
dc3ebaa38e
3 changed files with 69 additions and 5 deletions
|
|
@ -117,10 +117,15 @@ where
|
|||
height += item_height;
|
||||
}
|
||||
|
||||
limits.height(Length::Fixed(height)).resolve(
|
||||
let size = limits.height(Length::Fixed(height)).resolve(
|
||||
self.width,
|
||||
self.height,
|
||||
Size::new(width, height),
|
||||
)
|
||||
);
|
||||
|
||||
// Resize paragraph bounds so that text ellipsis can take effect.
|
||||
self.resize_paragraphs(state, size.width);
|
||||
|
||||
size
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue