feat(segmented_button): add ellipsize support

This commit is contained in:
Hojjat 2026-03-19 12:18:13 -06:00 committed by Ashley Wulber
parent 7a56762422
commit dc3ebaa38e
3 changed files with 69 additions and 5 deletions

View file

@ -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
}
}