feat: ellipsize text (#1132)
This commit is contained in:
parent
1f6086e5ea
commit
b9bd773940
7 changed files with 20 additions and 2 deletions
|
|
@ -728,6 +728,7 @@ where
|
|||
line_height: text::LineHeight::default(),
|
||||
shaping: text::Shaping::Advanced,
|
||||
wrapping: text::Wrapping::None,
|
||||
ellipsize: text::Ellipsize::None,
|
||||
});
|
||||
|
||||
let Size { width, height } =
|
||||
|
|
@ -1160,6 +1161,7 @@ pub fn layout<Message>(
|
|||
line_height,
|
||||
shaping: text::Shaping::Advanced,
|
||||
wrapping: text::Wrapping::None,
|
||||
ellipsize: text::Ellipsize::None,
|
||||
});
|
||||
let label_size = label_paragraph.min_bounds();
|
||||
|
||||
|
|
@ -1297,6 +1299,7 @@ pub fn layout<Message>(
|
|||
line_height: helper_text_line_height,
|
||||
shaping: text::Shaping::Advanced,
|
||||
wrapping: text::Wrapping::None,
|
||||
ellipsize: text::Ellipsize::None,
|
||||
});
|
||||
let helper_text_size = helper_text_paragraph.min_bounds();
|
||||
let helper_text_node = layout::Node::new(helper_text_size).translate(helper_pos);
|
||||
|
|
@ -2260,6 +2263,7 @@ pub fn draw<'a, Message>(
|
|||
line_height,
|
||||
shaping: text::Shaping::Advanced,
|
||||
wrapping: text::Wrapping::None,
|
||||
ellipsize: text::Ellipsize::None,
|
||||
},
|
||||
label_layout.bounds().position(),
|
||||
appearance.label_color,
|
||||
|
|
@ -2449,6 +2453,7 @@ pub fn draw<'a, Message>(
|
|||
line_height: text::LineHeight::default(),
|
||||
shaping: text::Shaping::Advanced,
|
||||
wrapping: text::Wrapping::None,
|
||||
ellipsize: text::Ellipsize::None,
|
||||
},
|
||||
bounds.position(),
|
||||
color,
|
||||
|
|
@ -2497,6 +2502,7 @@ pub fn draw<'a, Message>(
|
|||
line_height: helper_line_height,
|
||||
shaping: text::Shaping::Advanced,
|
||||
wrapping: text::Wrapping::None,
|
||||
ellipsize: text::Ellipsize::None,
|
||||
},
|
||||
helper_text_layout.bounds().position(),
|
||||
text_color,
|
||||
|
|
@ -2877,6 +2883,7 @@ fn replace_paragraph(
|
|||
vertical_alignment: alignment::Vertical::Top,
|
||||
shaping: text::Shaping::Advanced,
|
||||
wrapping: text::Wrapping::None,
|
||||
ellipsize: text::Ellipsize::None,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue