ui: Ensure Label with single_line set does not wrap (#21444)

Release Notes:

- N/A

---

Split from #21438, this change for make sure the `single_line` mode
Label will not be wrap.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
Jason Lee 2024-12-04 02:03:53 +08:00 committed by GitHub
parent 41a973b13f
commit afb253b406
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 14 deletions

View file

@ -65,6 +65,11 @@ impl LabelCommon for HighlightedLabel {
self.base = self.base.underline(underline);
self
}
fn single_line(mut self) -> Self {
self.base = self.base.single_line();
self
}
}
pub fn highlight_ranges(