ui: Add buffer_font
method to labels (#24479)
Now you don't need to wrap the `Label` in a `div` anymore Release Notes: - N/A Co-authored-by: Danilo <danilo@zed.dev>
This commit is contained in:
parent
6ee447ee58
commit
56cfc60875
4 changed files with 26 additions and 0 deletions
|
@ -172,6 +172,11 @@ impl LabelCommon for Label {
|
|||
self.base = self.base.single_line();
|
||||
self
|
||||
}
|
||||
|
||||
fn buffer_font(mut self, cx: &App) -> Self {
|
||||
self.base = self.base.buffer_font(cx);
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl RenderOnce for Label {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue