From 5dee8914ed1b65df7750bbb0ac3184280294db64 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Fri, 19 Jan 2024 15:27:05 -0700 Subject: [PATCH] Make chat font sizes consistently small --- crates/collab_ui/src/chat_panel.rs | 12 +++++------- crates/collab_ui/src/chat_panel/message_editor.rs | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/crates/collab_ui/src/chat_panel.rs b/crates/collab_ui/src/chat_panel.rs index ba8c71fb1e..2bb16637ad 100644 --- a/crates/collab_ui/src/chat_panel.rs +++ b/crates/collab_ui/src/chat_panel.rs @@ -349,15 +349,13 @@ impl ChatPanel { .when(!is_continuation_from_previous, |this| { this.pt_3().child( h_flex() - .child( - div().absolute().child( - Avatar::new(message.sender.avatar_uri.clone()) - .size(cx.rem_size() * 1.5), - ), - ) + .text_ui_sm() + .child(div().absolute().child( + Avatar::new(message.sender.avatar_uri.clone()).size(cx.rem_size()), + )) .child( div() - .pl(cx.rem_size() * 1.5 + px(6.0)) + .pl(cx.rem_size() + px(6.0)) .pr(px(8.0)) .font_weight(FontWeight::BOLD) .child(Label::new(message.sender.github_login.clone())), diff --git a/crates/collab_ui/src/chat_panel/message_editor.rs b/crates/collab_ui/src/chat_panel/message_editor.rs index 7999db529a..43b432cfb2 100644 --- a/crates/collab_ui/src/chat_panel/message_editor.rs +++ b/crates/collab_ui/src/chat_panel/message_editor.rs @@ -13,7 +13,7 @@ use lazy_static::lazy_static; use project::search::SearchQuery; use settings::Settings; use theme::ThemeSettings; -use ui::prelude::*; +use ui::{prelude::*, UiTextSize}; const MENTIONS_DEBOUNCE_INTERVAL: Duration = Duration::from_millis(50); @@ -216,7 +216,7 @@ impl Render for MessageEditor { }, font_family: settings.ui_font.family.clone(), font_features: settings.ui_font.features, - font_size: rems(0.875).into(), + font_size: UiTextSize::Small.rems().into(), font_weight: FontWeight::NORMAL, font_style: FontStyle::Normal, line_height: relative(1.3).into(),