assistant2: Tweak "Add Context" placeholder (#22596)
This PR tweaks the "Add Context" placeholder, as the text appeared to be vertically misaligned. #### Before <img width="215" alt="Screenshot 2025-01-02 at 6 03 06 PM" src="https://github.com/user-attachments/assets/1bac0deb-bd90-4ff3-b681-ee884cbe831d" /> #### After <img width="189" alt="Screenshot 2025-01-02 at 6 03 20 PM" src="https://github.com/user-attachments/assets/c9673fb0-11d6-42ac-8fec-9af269dfc73c" /> Release Notes: - N/A
This commit is contained in:
parent
16ead69052
commit
82492d74a8
1 changed files with 10 additions and 15 deletions
|
@ -4,7 +4,7 @@ use editor::Editor;
|
||||||
use gpui::{AppContext, FocusHandle, Model, View, WeakModel, WeakView};
|
use gpui::{AppContext, FocusHandle, Model, View, WeakModel, WeakView};
|
||||||
use language::Buffer;
|
use language::Buffer;
|
||||||
use project::ProjectEntryId;
|
use project::ProjectEntryId;
|
||||||
use ui::{prelude::*, PopoverMenu, PopoverMenuHandle, Tooltip};
|
use ui::{prelude::*, KeyBinding, PopoverMenu, PopoverMenuHandle, Tooltip};
|
||||||
use workspace::Workspace;
|
use workspace::Workspace;
|
||||||
|
|
||||||
use crate::context::ContextKind;
|
use crate::context::ContextKind;
|
||||||
|
@ -14,7 +14,6 @@ use crate::thread::{Thread, ThreadId};
|
||||||
use crate::thread_store::ThreadStore;
|
use crate::thread_store::ThreadStore;
|
||||||
use crate::ui::ContextPill;
|
use crate::ui::ContextPill;
|
||||||
use crate::{AssistantPanel, ToggleContextPicker};
|
use crate::{AssistantPanel, ToggleContextPicker};
|
||||||
use settings::Settings;
|
|
||||||
|
|
||||||
pub struct ContextStrip {
|
pub struct ContextStrip {
|
||||||
context_store: Model<ContextStore>,
|
context_store: Model<ContextStore>,
|
||||||
|
@ -153,22 +152,18 @@ impl Render for ContextStrip {
|
||||||
|parent| {
|
|parent| {
|
||||||
parent.child(
|
parent.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.id("no-content-info")
|
|
||||||
.ml_1p5()
|
.ml_1p5()
|
||||||
.gap_2()
|
.gap_2()
|
||||||
.font(theme::ThemeSettings::get_global(cx).buffer_font.clone())
|
.child(
|
||||||
.text_size(TextSize::Small.rems(cx))
|
Label::new("Add Context")
|
||||||
.text_color(cx.theme().colors().text_muted)
|
.size(LabelSize::Small)
|
||||||
.child("Add Context")
|
.color(Color::Muted),
|
||||||
|
)
|
||||||
|
.opacity(0.5)
|
||||||
.children(
|
.children(
|
||||||
ui::KeyBinding::for_action_in(
|
KeyBinding::for_action_in(&ToggleContextPicker, &focus_handle, cx)
|
||||||
&ToggleContextPicker,
|
|
||||||
&focus_handle,
|
|
||||||
cx,
|
|
||||||
)
|
|
||||||
.map(|binding| binding.into_any_element()),
|
.map(|binding| binding.into_any_element()),
|
||||||
)
|
),
|
||||||
.opacity(0.5),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue