From 82492d74a8d0350cba66671c27e282a928fd4c85 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 2 Jan 2025 18:18:32 -0500 Subject: [PATCH] assistant2: Tweak "Add Context" placeholder (#22596) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR tweaks the "Add Context" placeholder, as the text appeared to be vertically misaligned. #### Before Screenshot 2025-01-02 at 6 03 06 PM #### After Screenshot 2025-01-02 at 6 03 20 PM Release Notes: - N/A --- crates/assistant2/src/context_strip.rs | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/crates/assistant2/src/context_strip.rs b/crates/assistant2/src/context_strip.rs index b297ff323496f..35ed504f9cce5 100644 --- a/crates/assistant2/src/context_strip.rs +++ b/crates/assistant2/src/context_strip.rs @@ -4,7 +4,7 @@ use editor::Editor; use gpui::{AppContext, FocusHandle, Model, View, WeakModel, WeakView}; use language::Buffer; use project::ProjectEntryId; -use ui::{prelude::*, PopoverMenu, PopoverMenuHandle, Tooltip}; +use ui::{prelude::*, KeyBinding, PopoverMenu, PopoverMenuHandle, Tooltip}; use workspace::Workspace; use crate::context::ContextKind; @@ -14,7 +14,6 @@ use crate::thread::{Thread, ThreadId}; use crate::thread_store::ThreadStore; use crate::ui::ContextPill; use crate::{AssistantPanel, ToggleContextPicker}; -use settings::Settings; pub struct ContextStrip { context_store: Model, @@ -153,22 +152,18 @@ impl Render for ContextStrip { |parent| { parent.child( h_flex() - .id("no-content-info") .ml_1p5() .gap_2() - .font(theme::ThemeSettings::get_global(cx).buffer_font.clone()) - .text_size(TextSize::Small.rems(cx)) - .text_color(cx.theme().colors().text_muted) - .child("Add Context") - .children( - ui::KeyBinding::for_action_in( - &ToggleContextPicker, - &focus_handle, - cx, - ) - .map(|binding| binding.into_any_element()), + .child( + Label::new("Add Context") + .size(LabelSize::Small) + .color(Color::Muted), ) - .opacity(0.5), + .opacity(0.5) + .children( + KeyBinding::for_action_in(&ToggleContextPicker, &focus_handle, cx) + .map(|binding| binding.into_any_element()), + ), ) } })