diff --git a/zed/assets/themes/_base.toml b/zed/assets/themes/_base.toml index 17145584943a5f9caae04fcec602e2a327470751..56dbbdaaf10bdbe8bbf079867957827f8cc84f08 100644 --- a/zed/assets/themes/_base.toml +++ b/zed/assets/themes/_base.toml @@ -22,6 +22,9 @@ color = "$text.2" [workspace.active_sidebar_icon] color = "$text.0" +[chat_panel.message] +text = "$text.0" + [selector] background = "$surface.2" text = "$text.0" diff --git a/zed/src/chat_panel.rs b/zed/src/chat_panel.rs index 5758879cd1faebd224fa50554498877a147298fc..7788ab2eba782dc74b8b14ffcfa95f50ae9bcc1f 100644 --- a/zed/src/chat_panel.rs +++ b/zed/src/chat_panel.rs @@ -116,16 +116,13 @@ impl ChatPanel { fn render_message(&self, message: &ChannelMessage) -> ElementBox { let settings = self.settings.borrow(); - Flex::column() - .with_child( - Label::new( - message.body.clone(), - settings.ui_font_family, - settings.ui_font_size, - ) - .boxed(), - ) - .boxed() + Label::new( + message.body.clone(), + settings.ui_font_family, + settings.ui_font_size, + ) + .with_style(&settings.theme.chat_panel.message.label) + .boxed() } fn render_input_box(&self) -> ElementBox { diff --git a/zed/src/theme.rs b/zed/src/theme.rs index a502f2ae673e73e39321409f2f472e07b3b7c2c9..0bd5b3593d48cc589d8e1b5e575e7d24a8d657ca 100644 --- a/zed/src/theme.rs +++ b/zed/src/theme.rs @@ -20,6 +20,7 @@ pub struct Theme { #[serde(default)] pub name: String, pub workspace: Workspace, + pub chat_panel: ChatPanel, pub selector: Selector, pub editor: Editor, #[serde(deserialize_with = "deserialize_syntax_theme")] @@ -52,6 +53,17 @@ pub struct SidebarIcon { pub color: Color, } +#[derive(Debug, Default, Deserialize)] +pub struct ChatPanel { + pub message: ChatMessage, +} + +#[derive(Debug, Default, Deserialize)] +pub struct ChatMessage { + #[serde(flatten)] + pub label: LabelStyle, +} + #[derive(Debug, Default, Deserialize)] pub struct Selector { #[serde(flatten)]