Remove additional wrapping elements in the chat panel (#14013)
This PR removes some wrapping elements that were used inside of the chat panel. To facilitate this, the `Label` component now has a `weight` method to change the font weight. Release Notes: - N/A
This commit is contained in:
parent
df935df5a3
commit
c6b9f1920f
4 changed files with 39 additions and 26 deletions
|
@ -1,6 +1,6 @@
|
|||
use std::ops::Range;
|
||||
|
||||
use gpui::{HighlightStyle, StyledText};
|
||||
use gpui::{FontWeight, HighlightStyle, StyledText};
|
||||
|
||||
use crate::{prelude::*, LabelCommon, LabelLike, LabelSize, LineHeightStyle};
|
||||
|
||||
|
@ -29,6 +29,11 @@ impl LabelCommon for HighlightedLabel {
|
|||
self
|
||||
}
|
||||
|
||||
fn weight(mut self, weight: FontWeight) -> Self {
|
||||
self.base = self.base.weight(weight);
|
||||
self
|
||||
}
|
||||
|
||||
fn line_height_style(mut self, line_height_style: LineHeightStyle) -> Self {
|
||||
self.base = self.base.line_height_style(line_height_style);
|
||||
self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue