Revise and clean up some icons (#35582)

This is really just a small beginning, as there are many other icons to
be revised and cleaned up. Our current set is a bit of a mess in terms
of dimension, spacing, stroke width, and terminology. I'm sure there are
more non-used icons I'm not covering here, too. We'll hopefully tackle
it all soon leading up to 1.0.

Closes https://github.com/zed-industries/zed/issues/35576

Release Notes:

- N/A
This commit is contained in:
Danilo Leal 2025-08-04 11:58:31 -03:00 committed by GitHub
parent 8b573d4395
commit 0609c8b953
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
58 changed files with 154 additions and 271 deletions

View file

@ -42,8 +42,8 @@ impl ContextKind {
ContextKind::Symbol => IconName::Code,
ContextKind::Selection => IconName::Context,
ContextKind::FetchedUrl => IconName::Globe,
ContextKind::Thread => IconName::MessageBubbles,
ContextKind::TextThread => IconName::MessageBubbles,
ContextKind::Thread => IconName::Thread,
ContextKind::TextThread => IconName::TextThread,
ContextKind::Rules => RULES_ICON,
ContextKind::Image => IconName::Image,
}

View file

@ -483,7 +483,7 @@ impl ManageProfilesModal {
let icon = match mode.profile_id.as_str() {
"write" => IconName::Pencil,
"ask" => IconName::MessageBubbles,
"ask" => IconName::Chat,
_ => IconName::UserRoundPen,
};

View file

@ -1911,27 +1911,6 @@ impl AgentPanel {
.when(cx.has_flag::<feature_flags::AcpFeatureFlag>(), |this| {
this.header("Zed Agent")
})
.item(
ContextMenuEntry::new("New Thread")
.icon(IconName::NewThread)
.icon_color(Color::Muted)
.action(NewThread::default().boxed_clone())
.handler(move |window, cx| {
window.dispatch_action(
NewThread::default().boxed_clone(),
cx,
);
}),
)
.item(
ContextMenuEntry::new("New Text Thread")
.icon(IconName::NewTextThread)
.icon_color(Color::Muted)
.action(NewTextThread.boxed_clone())
.handler(move |window, cx| {
window.dispatch_action(NewTextThread.boxed_clone(), cx);
}),
)
.when_some(active_thread, |this, active_thread| {
let thread = active_thread.read(cx);
@ -1939,7 +1918,7 @@ impl AgentPanel {
let thread_id = thread.id().clone();
this.item(
ContextMenuEntry::new("New From Summary")
.icon(IconName::NewFromSummary)
.icon(IconName::ThreadFromSummary)
.icon_color(Color::Muted)
.handler(move |window, cx| {
window.dispatch_action(
@ -1954,6 +1933,27 @@ impl AgentPanel {
this
}
})
.item(
ContextMenuEntry::new("New Thread")
.icon(IconName::Thread)
.icon_color(Color::Muted)
.action(NewThread::default().boxed_clone())
.handler(move |window, cx| {
window.dispatch_action(
NewThread::default().boxed_clone(),
cx,
);
}),
)
.item(
ContextMenuEntry::new("New Text Thread")
.icon(IconName::TextThread)
.icon_color(Color::Muted)
.action(NewTextThread.boxed_clone())
.handler(move |window, cx| {
window.dispatch_action(NewTextThread.boxed_clone(), cx);
}),
)
.when(cx.has_flag::<feature_flags::AcpFeatureFlag>(), |this| {
this.separator()
.header("External Agents")
@ -2558,7 +2558,7 @@ impl AgentPanel {
NewThreadButton::new(
"new-thread-btn",
"New Thread",
IconName::NewThread,
IconName::Thread,
)
.keybinding(KeyBinding::for_action_in(
&NewThread::default(),
@ -2579,7 +2579,7 @@ impl AgentPanel {
NewThreadButton::new(
"new-text-thread-btn",
"New Text Thread",
IconName::NewTextThread,
IconName::TextThread,
)
.keybinding(KeyBinding::for_action_in(
&NewTextThread,

View file

@ -148,7 +148,7 @@ impl ContextPickerMode {
Self::File => IconName::File,
Self::Symbol => IconName::Code,
Self::Fetch => IconName::Globe,
Self::Thread => IconName::MessageBubbles,
Self::Thread => IconName::Thread,
Self::Rules => RULES_ICON,
}
}

View file

@ -423,7 +423,7 @@ impl ContextPickerCompletionProvider {
let icon_for_completion = if recent {
IconName::HistoryRerun
} else {
IconName::MessageBubbles
IconName::Thread
};
let new_text = format!("{} ", MentionLink::for_thread(&thread_entry));
let new_text_len = new_text.len();
@ -436,7 +436,7 @@ impl ContextPickerCompletionProvider {
source: project::CompletionSource::Custom,
icon_path: Some(icon_for_completion.path().into()),
confirm: Some(confirm_completion_callback(
IconName::MessageBubbles.path().into(),
IconName::Thread.path().into(),
thread_entry.title().clone(),
excerpt_id,
source_range.start,

View file

@ -253,7 +253,7 @@ pub fn render_thread_context_entry(
.gap_1p5()
.max_w_72()
.child(
Icon::new(IconName::MessageBubbles)
Icon::new(IconName::Thread)
.size(IconSize::XSmall)
.color(Color::Muted),
)

View file

@ -541,7 +541,7 @@ impl<T: 'static> PromptEditor<T> {
match &self.mode {
PromptEditorMode::Terminal { .. } => vec![
accept,
IconButton::new("confirm", IconName::Play)
IconButton::new("confirm", IconName::PlayOutlined)
.icon_color(Color::Info)
.shape(IconButtonShape::Square)
.tooltip(|window, cx| {

View file

@ -701,7 +701,7 @@ impl RenderOnce for HistoryEntryElement {
.on_hover(self.on_hover)
.end_slot::<IconButton>(if self.hovered || self.selected {
Some(
IconButton::new("delete", IconName::TrashAlt)
IconButton::new("delete", IconName::Trash)
.shape(IconButtonShape::Square)
.icon_size(IconSize::XSmall)
.icon_color(Color::Muted)

View file

@ -1162,7 +1162,7 @@ impl Panel for ChatPanel {
}
fn icon(&self, _window: &Window, cx: &App) -> Option<ui::IconName> {
self.enabled(cx).then(|| ui::IconName::MessageBubbles)
self.enabled(cx).then(|| ui::IconName::Chat)
}
fn icon_tooltip(&self, _: &Window, _: &App) -> Option<&'static str> {

View file

@ -1124,7 +1124,7 @@ impl CollabPanel {
.relative()
.gap_1()
.child(render_tree_branch(false, false, window, cx))
.child(IconButton::new(0, IconName::MessageBubbles))
.child(IconButton::new(0, IconName::Chat))
.children(has_messages_notification.then(|| {
div()
.w_1p5()
@ -2923,7 +2923,7 @@ impl CollabPanel {
.gap_1()
.px_1()
.child(
IconButton::new("channel_chat", IconName::MessageBubbles)
IconButton::new("channel_chat", IconName::Chat)
.style(ButtonStyle::Filled)
.shape(ui::IconButtonShape::Square)
.icon_size(IconSize::Small)
@ -2939,7 +2939,7 @@ impl CollabPanel {
.visible_on_hover(""),
)
.child(
IconButton::new("channel_notes", IconName::File)
IconButton::new("channel_notes", IconName::FileText)
.style(ButtonStyle::Filled)
.shape(ui::IconButtonShape::Square)
.icon_size(IconSize::Small)

View file

@ -6403,7 +6403,6 @@ impl Editor {
IconButton::new("inline_code_actions", ui::IconName::BoltFilled)
.icon_size(icon_size)
.shape(ui::IconButtonShape::Square)
.style(ButtonStyle::Transparent)
.icon_color(ui::Color::Hidden)
.toggle_state(is_active)
.when(show_tooltip, |this| {
@ -8338,26 +8337,29 @@ impl Editor {
let color = Color::Muted;
let position = breakpoint.as_ref().map(|(anchor, _, _)| *anchor);
IconButton::new(("run_indicator", row.0 as usize), ui::IconName::Play)
.shape(ui::IconButtonShape::Square)
.icon_size(IconSize::XSmall)
.icon_color(color)
.toggle_state(is_active)
.on_click(cx.listener(move |editor, e: &ClickEvent, window, cx| {
let quick_launch = e.down.button == MouseButton::Left;
window.focus(&editor.focus_handle(cx));
editor.toggle_code_actions(
&ToggleCodeActions {
deployed_from: Some(CodeActionSource::RunMenu(row)),
quick_launch,
},
window,
cx,
);
}))
.on_right_click(cx.listener(move |editor, event: &ClickEvent, window, cx| {
editor.set_breakpoint_context_menu(row, position, event.down.position, window, cx);
}))
IconButton::new(
("run_indicator", row.0 as usize),
ui::IconName::PlayOutlined,
)
.shape(ui::IconButtonShape::Square)
.icon_size(IconSize::XSmall)
.icon_color(color)
.toggle_state(is_active)
.on_click(cx.listener(move |editor, e: &ClickEvent, window, cx| {
let quick_launch = e.down.button == MouseButton::Left;
window.focus(&editor.focus_handle(cx));
editor.toggle_code_actions(
&ToggleCodeActions {
deployed_from: Some(CodeActionSource::RunMenu(row)),
quick_launch,
},
window,
cx,
);
}))
.on_right_click(cx.listener(move |editor, event: &ClickEvent, window, cx| {
editor.set_breakpoint_context_menu(row, position, event.down.position, window, cx);
}))
}
pub fn context_menu_visible(&self) -> bool {

View file

@ -38,7 +38,6 @@ pub enum IconName {
ArrowUpFromLine,
ArrowUpRight,
ArrowUpRightAlt,
AtSign,
AudioOff,
AudioOn,
Backspace,
@ -48,15 +47,13 @@ pub enum IconName {
BellRing,
Binary,
Blocks,
Bolt,
BoltOutlined,
BoltFilled,
BoltFilledAlt,
Book,
BookCopy,
BookPlus,
Brain,
BugOff,
CaseSensitive,
Chat,
Check,
CheckDouble,
ChevronDown,
@ -184,14 +181,9 @@ pub enum IconName {
Maximize,
Menu,
MenuAlt,
MessageBubbles,
Mic,
MicMute,
Microscope,
Minimize,
NewFromSummary,
NewTextThread,
NewThread,
Option,
PageDown,
PageUp,
@ -202,9 +194,7 @@ pub enum IconName {
PersonCircle,
PhoneIncoming,
Pin,
Play,
PlayAlt,
PlayBug,
PlayOutlined,
PlayFilled,
Plus,
PocketKnife,
@ -221,7 +211,6 @@ pub enum IconName {
ReplyArrowRight,
Rerun,
Return,
Reveal,
RotateCcw,
RotateCw,
Route,
@ -246,7 +235,6 @@ pub enum IconName {
Sparkle,
SparkleAlt,
SparkleFilled,
Spinner,
Split,
SplitAlt,
SquareDot,
@ -256,7 +244,6 @@ pub enum IconName {
StarFilled,
Stop,
StopFilled,
Strikethrough,
Supermaven,
SupermavenDisabled,
SupermavenError,
@ -266,6 +253,9 @@ pub enum IconName {
Terminal,
TerminalAlt,
TextSnippet,
TextThread,
Thread,
ThreadFromSummary,
ThumbsDown,
ThumbsUp,
TodoComplete,
@ -285,7 +275,6 @@ pub enum IconName {
ToolTerminal,
ToolWeb,
Trash,
TrashAlt,
Triangle,
TriangleRight,
Undo,

View file

@ -744,7 +744,7 @@ impl Render for ConfigurationView {
Button::new("retry_lmstudio_models", "Connect")
.icon_position(IconPosition::Start)
.icon_size(IconSize::XSmall)
.icon(IconName::Play)
.icon(IconName::PlayOutlined)
.on_click(cx.listener(move |this, _, _window, cx| {
this.retry_connection(cx)
})),

View file

@ -658,7 +658,7 @@ impl Render for ConfigurationView {
Button::new("retry_ollama_models", "Connect")
.icon_position(IconPosition::Start)
.icon_size(IconSize::XSmall)
.icon(IconName::Play)
.icon(IconName::PlayOutlined)
.on_click(cx.listener(move |this, _, _, cx| {
this.retry_connection(cx)
})),

View file

@ -1015,7 +1015,7 @@ impl Render for LspTool {
.anchor(Corner::BottomLeft)
.with_handle(self.popover_menu_handle.clone())
.trigger_with_tooltip(
IconButton::new("zed-lsp-tool-button", IconName::Bolt)
IconButton::new("zed-lsp-tool-button", IconName::BoltOutlined)
.when_some(indicator, IconButton::indicator)
.icon_size(IconSize::Small)
.indicator_border_color(Some(cx.theme().colors().status_bar_background)),

View file

@ -963,7 +963,7 @@ impl RemoteServerProjects {
.child({
let project = project.clone();
// Right-margin to offset it from the Scrollbar
IconButton::new("remove-remote-project", IconName::TrashAlt)
IconButton::new("remove-remote-project", IconName::Trash)
.icon_size(IconSize::Small)
.shape(IconButtonShape::Square)
.size(ButtonSize::Large)

View file

@ -38,7 +38,7 @@ pub enum CellControlType {
impl CellControlType {
fn icon_name(&self) -> IconName {
match self {
CellControlType::RunCell => IconName::Play,
CellControlType::RunCell => IconName::PlayOutlined,
CellControlType::RerunCell => IconName::ArrowCircle,
CellControlType::ClearCell => IconName::ListX,
CellControlType::CellOptions => IconName::Ellipsis,

View file

@ -343,7 +343,7 @@ impl NotebookEditor {
.child(
Self::render_notebook_control(
"run-all-cells",
IconName::Play,
IconName::PlayOutlined,
window,
cx,
)

View file

@ -319,7 +319,7 @@ impl PickerDelegate for RulePickerDelegate {
})
.into_any()
} else {
IconButton::new("delete-rule", IconName::TrashAlt)
IconButton::new("delete-rule", IconName::Trash)
.icon_color(Color::Muted)
.icon_size(IconSize::Small)
.shape(IconButtonShape::Square)
@ -1163,7 +1163,7 @@ impl RulesLibrary {
})
.into_any()
} else {
IconButton::new("delete-rule", IconName::TrashAlt)
IconButton::new("delete-rule", IconName::Trash)
.icon_size(IconSize::Small)
.tooltip(move |window, cx| {
Tooltip::for_action(

View file

@ -500,7 +500,7 @@ impl PickerDelegate for TasksModalDelegate {
.map(|icon| icon.color(Color::Muted).size(IconSize::Small));
let indicator = if matches!(source_kind, TaskSourceKind::Lsp { .. }) {
Some(Indicator::icon(
Icon::new(IconName::Bolt).size(IconSize::Small),
Icon::new(IconName::BoltOutlined).size(IconSize::Small),
))
} else {
None

View file

@ -1591,7 +1591,7 @@ impl Item for TerminalView {
let (icon, icon_color, rerun_button) = match terminal.task() {
Some(terminal_task) => match &terminal_task.status {
TaskStatus::Running => (
IconName::Play,
IconName::PlayOutlined,
Color::Disabled,
TerminalView::rerun_button(&terminal_task),
),

View file

@ -77,7 +77,7 @@ impl Render for IconButtonStory {
let with_tooltip_button = StoryItem::new(
"With `tooltip`",
IconButton::new("with_tooltip_button", IconName::MessageBubbles)
IconButton::new("with_tooltip_button", IconName::Chat)
.tooltip(Tooltip::text("Open messages")),
)
.description("Displays an icon button that has a tooltip when hovered.")

View file

@ -192,7 +192,7 @@ impl Render for QuickActionBar {
};
v_flex()
.child(
IconButton::new("toggle_code_actions_icon", IconName::Bolt)
IconButton::new("toggle_code_actions_icon", IconName::BoltOutlined)
.icon_size(IconSize::Small)
.style(ButtonStyle::Subtle)
.disabled(!has_available_code_actions)