Use Text in chat panel

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2021-08-25 16:42:35 +02:00
co-authored by Nathan Sobo
parent 72f282eb3a
commit 3d5cfb78ea
3 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ color = "$text.2"
color = "$text.0"
[chat_panel.message]
text = "$text.0"
body = "$text.0"
[selector]
background = "$surface.2"
+2 -2
View File
@@ -116,12 +116,12 @@ impl ChatPanel {
fn render_message(&self, message: &ChannelMessage) -> ElementBox {
let settings = self.settings.borrow();
Label::new(
Text::new(
message.body.clone(),
settings.ui_font_family,
settings.ui_font_size,
)
.with_style(&settings.theme.chat_panel.message.label)
.with_style(&settings.theme.chat_panel.message.body)
.boxed()
}
+1 -2
View File
@@ -60,8 +60,7 @@ pub struct ChatPanel {
#[derive(Debug, Default, Deserialize)]
pub struct ChatMessage {
#[serde(flatten)]
pub label: LabelStyle,
pub body: TextStyle,
}
#[derive(Debug, Default, Deserialize)]