@@ -172,6 +172,7 @@ pub struct PickList<
172172 text_line_height : text:: LineHeight ,
173173 text_shaping : text:: Shaping ,
174174 text_wrap : text:: Wrapping ,
175+ text_ellipsize : text:: Ellipsize ,
175176 font : Option < Renderer :: Font > ,
176177 handle : Handle < Renderer :: Font > ,
177178 class : <Theme as Catalog >:: Class < ' a > ,
@@ -208,6 +209,7 @@ where
208209 text_line_height : text:: LineHeight :: default ( ) ,
209210 text_shaping : text:: Shaping :: Advanced ,
210211 text_wrap : text:: Wrapping :: default ( ) ,
212+ text_ellipsize : text:: Ellipsize :: default ( ) ,
211213 font : None ,
212214 handle : Handle :: default ( ) ,
213215 class : <Theme as Catalog >:: default ( ) ,
@@ -383,6 +385,7 @@ where
383385 vertical_alignment : alignment:: Vertical :: Center ,
384386 shaping : self . text_shaping ,
385387 wrapping : self . text_wrap ,
388+ ellipsize : self . text_ellipsize ,
386389 } ;
387390
388391 for ( option, paragraph) in options. iter ( ) . zip ( state. options . iter_mut ( ) )
@@ -603,6 +606,7 @@ where
603606 text:: LineHeight :: default ( ) ,
604607 text:: Shaping :: Basic ,
605608 text:: Wrapping :: default ( ) ,
609+ text:: Ellipsize :: default ( ) ,
606610 ) ) ,
607611 Handle :: Static ( Icon {
608612 font,
@@ -611,9 +615,16 @@ where
611615 line_height,
612616 shaping,
613617 wrap,
614- } ) => {
615- Some ( ( * font, * code_point, * size, * line_height, * shaping, * wrap) )
616- }
618+ ellipsize,
619+ } ) => Some ( (
620+ * font,
621+ * code_point,
622+ * size,
623+ * line_height,
624+ * shaping,
625+ * wrap,
626+ * ellipsize,
627+ ) ) ,
617628 Handle :: Dynamic { open, closed } => {
618629 if state. is_open {
619630 Some ( (
@@ -623,6 +634,7 @@ where
623634 open. line_height ,
624635 open. shaping ,
625636 open. wrap ,
637+ open. ellipsize ,
626638 ) )
627639 } else {
628640 Some ( (
@@ -632,14 +644,22 @@ where
632644 closed. line_height ,
633645 closed. shaping ,
634646 closed. wrap ,
647+ closed. ellipsize ,
635648 ) )
636649 }
637650 }
638651 Handle :: None => None ,
639652 } ;
640653
641- if let Some ( ( font, code_point, size, line_height, shaping, wrap) ) =
642- handle
654+ if let Some ( (
655+ font,
656+ code_point,
657+ size,
658+ line_height,
659+ shaping,
660+ wrap,
661+ ellipsize,
662+ ) ) = handle
643663 {
644664 let size = size. unwrap_or_else ( || renderer. default_size ( ) ) ;
645665
@@ -657,6 +677,7 @@ where
657677 vertical_alignment : alignment:: Vertical :: Center ,
658678 shaping,
659679 wrapping : wrap,
680+ ellipsize : ellipsize,
660681 } ,
661682 Point :: new (
662683 bounds. x + bounds. width - self . padding . right ,
@@ -687,6 +708,7 @@ where
687708 vertical_alignment : alignment:: Vertical :: Center ,
688709 shaping : self . text_shaping ,
689710 wrapping : self . text_wrap ,
711+ ellipsize : self . text_ellipsize ,
690712 } ,
691713 Point :: new ( bounds. x + self . padding . left , bounds. center_y ( ) ) ,
692714 if is_selected {
@@ -834,6 +856,8 @@ pub struct Icon<Font> {
834856 pub shaping : text:: Shaping ,
835857 /// The wrap mode of the icon.
836858 pub wrap : text:: Wrapping ,
859+ /// The ellipsize mode of the icon.
860+ pub ellipsize : text:: Ellipsize ,
837861}
838862
839863/// The possible status of a [`PickList`].
0 commit comments