ui: Add text_ellipsis
method to Label
s (#22118)
This PR adds a `text_ellipsis` method to `Label`s. This can be used to truncate the text with an ellipsis without needing to wrap the `Label` in another element. Release Notes: - N/A
This commit is contained in:
parent
ac24f074df
commit
8e71e46867
5 changed files with 57 additions and 39 deletions
|
@ -164,6 +164,11 @@ impl LabelCommon for Label {
|
|||
self
|
||||
}
|
||||
|
||||
fn text_ellipsis(mut self) -> Self {
|
||||
self.base = self.base.text_ellipsis();
|
||||
self
|
||||
}
|
||||
|
||||
fn single_line(mut self) -> Self {
|
||||
self.single_line = true;
|
||||
self.base = self.base.single_line();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue