diff --git a/assets/icons/at-sign.svg b/assets/icons/at_sign.svg similarity index 85% rename from assets/icons/at-sign.svg rename to assets/icons/at_sign.svg index 5adac38f62fb661e11d0f2e8f4ea17c94683aa5f..4cf8cd468f17e5cbcd012c6225543f6c4b027969 100644 --- a/assets/icons/at-sign.svg +++ b/assets/icons/at_sign.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/assets/icons/bell-off.svg b/assets/icons/bell_off.svg similarity index 100% rename from assets/icons/bell-off.svg rename to assets/icons/bell_off.svg diff --git a/assets/icons/bell-ring.svg b/assets/icons/bell_ring.svg similarity index 100% rename from assets/icons/bell-ring.svg rename to assets/icons/bell_ring.svg diff --git a/assets/icons/delete.svg b/assets/icons/delete.svg index 1068cb65f29a02cdf9b5f418239ed3069e4d1a3e..a7edbb615871745c0277b242b189a7e39135a4ed 100644 --- a/assets/icons/delete.svg +++ b/assets/icons/delete.svg @@ -1,4 +1 @@ - - - - + diff --git a/assets/icons/escape.svg b/assets/icons/escape.svg new file mode 100644 index 0000000000000000000000000000000000000000..00c772a2adfea0b43c10c5635c05649a00756de3 --- /dev/null +++ b/assets/icons/escape.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/magic-wand.svg b/assets/icons/magic_wand.svg similarity index 100% rename from assets/icons/magic-wand.svg rename to assets/icons/magic_wand.svg diff --git a/assets/icons/mail-open.svg b/assets/icons/mail_open.svg similarity index 100% rename from assets/icons/mail-open.svg rename to assets/icons/mail_open.svg diff --git a/assets/icons/mic-mute.svg b/assets/icons/mic_mute.svg similarity index 100% rename from assets/icons/mic-mute.svg rename to assets/icons/mic_mute.svg diff --git a/assets/icons/page_down.svg b/assets/icons/page_down.svg new file mode 100644 index 0000000000000000000000000000000000000000..765f36b26a6f85669157f65d45128a604f8c695a --- /dev/null +++ b/assets/icons/page_down.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/page_up.svg b/assets/icons/page_up.svg new file mode 100644 index 0000000000000000000000000000000000000000..f555165d2db9e85f8f2920fb7de258e7e64fb579 --- /dev/null +++ b/assets/icons/page_up.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/assets/icons/return.svg b/assets/icons/return.svg index 683519c3066fef61cb256a103dcd219fe59ff9f1..16cfeeda2e3ad0e2acee6d7a594916e796fd2405 100644 --- a/assets/icons/return.svg +++ b/assets/icons/return.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/select-all.svg b/assets/icons/select_all.svg similarity index 100% rename from assets/icons/select-all.svg rename to assets/icons/select_all.svg diff --git a/assets/icons/space.svg b/assets/icons/space.svg new file mode 100644 index 0000000000000000000000000000000000000000..63718fb4aa1e1300621d29ca5bddd4e130c4796e --- /dev/null +++ b/assets/icons/space.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/speaker-loud.svg b/assets/icons/speaker_loud.svg similarity index 100% rename from assets/icons/speaker-loud.svg rename to assets/icons/speaker_loud.svg diff --git a/assets/icons/speaker-off.svg b/assets/icons/speaker_off.svg similarity index 100% rename from assets/icons/speaker-off.svg rename to assets/icons/speaker_off.svg diff --git a/assets/icons/tab.svg b/assets/icons/tab.svg new file mode 100644 index 0000000000000000000000000000000000000000..49a3536bedd51ee70dd914710801bc9dbaf51616 --- /dev/null +++ b/assets/icons/tab.svg @@ -0,0 +1 @@ + diff --git a/crates/ui/src/components/icon.rs b/crates/ui/src/components/icon.rs index df1c82bb666d2a20084387f80a5896f73266d598..f1916d3dce2409101fc93383af08560892a92f74 100644 --- a/crates/ui/src/components/icon.rs +++ b/crates/ui/src/components/icon.rs @@ -24,10 +24,10 @@ impl IconSize { #[derive(Debug, PartialEq, Copy, Clone, EnumIter)] pub enum Icon { Ai, - ArrowLeft, - ArrowUp, ArrowDown, + ArrowLeft, ArrowRight, + ArrowUp, ArrowUpRight, AtSign, AudioOff, @@ -39,25 +39,28 @@ pub enum Icon { Bolt, CaseSensitive, Check, - Copy, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Close, Collab, + Command, + Control, Copilot, - CopilotInit, - CopilotError, CopilotDisabled, + CopilotError, + CopilotInit, + Copy, Dash, Delete, Disconnected, Ellipsis, Envelope, - ExternalLink, + Escape, ExclamationTriangle, Exit, + ExternalLink, File, FileDoc, FileGeneric, @@ -78,30 +81,32 @@ pub enum Icon { MagnifyingGlass, MailOpen, Maximize, - Minimize, Menu, MessageBubbles, Mic, MicMute, + Minimize, + Option, + PageDown, + PageUp, Plus, Public, Quote, Replace, ReplaceAll, ReplaceNext, + Return, Screen, SelectAll, - Split, + Shift, Snip, + Space, + Split, + Tab, Terminal, + Update, WholeWord, XCircle, - Command, - Control, - Shift, - Option, - Return, - Update, ZedXCopilot, } @@ -109,40 +114,43 @@ impl Icon { pub fn path(self) -> &'static str { match self { Icon::Ai => "icons/ai.svg", + Icon::ArrowDown => "icons/arrow_down.svg", Icon::ArrowLeft => "icons/arrow_left.svg", Icon::ArrowRight => "icons/arrow_right.svg", Icon::ArrowUp => "icons/arrow_up.svg", - Icon::ArrowDown => "icons/arrow_down.svg", Icon::ArrowUpRight => "icons/arrow_up_right.svg", - Icon::AtSign => "icons/at-sign.svg", - Icon::AudioOff => "icons/speaker-off.svg", + Icon::AtSign => "icons/at_sign.svg", + Icon::AudioOff => "icons/speaker_off.svg", Icon::AudioOn => "icons/speaker-loud.svg", Icon::Backspace => "icons/backspace.svg", Icon::Bell => "icons/bell.svg", - Icon::BellOff => "icons/bell-off.svg", - Icon::BellRing => "icons/bell-ring.svg", + Icon::BellOff => "icons/bell_off.svg", + Icon::BellRing => "icons/bell_ring.svg", Icon::Bolt => "icons/bolt.svg", Icon::CaseSensitive => "icons/case_insensitive.svg", Icon::Check => "icons/check.svg", - Icon::Copy => "icons/copy.svg", Icon::ChevronDown => "icons/chevron_down.svg", Icon::ChevronLeft => "icons/chevron_left.svg", Icon::ChevronRight => "icons/chevron_right.svg", Icon::ChevronUp => "icons/chevron_up.svg", Icon::Close => "icons/x.svg", Icon::Collab => "icons/user_group_16.svg", + Icon::Command => "icons/command.svg", + Icon::Control => "icons/control.svg", Icon::Copilot => "icons/copilot.svg", - Icon::CopilotInit => "icons/copilot_init.svg", - Icon::CopilotError => "icons/copilot_error.svg", Icon::CopilotDisabled => "icons/copilot_disabled.svg", + Icon::CopilotError => "icons/copilot_error.svg", + Icon::CopilotInit => "icons/copilot_init.svg", + Icon::Copy => "icons/copy.svg", Icon::Dash => "icons/dash.svg", Icon::Delete => "icons/delete.svg", Icon::Disconnected => "icons/disconnected.svg", Icon::Ellipsis => "icons/ellipsis.svg", Icon::Envelope => "icons/feedback.svg", + Icon::Escape => "icons/escape.svg", Icon::ExclamationTriangle => "icons/warning.svg", - Icon::ExternalLink => "icons/external_link.svg", Icon::Exit => "icons/exit.svg", + Icon::ExternalLink => "icons/external_link.svg", Icon::File => "icons/file.svg", Icon::FileDoc => "icons/file_icons/book.svg", Icon::FileGeneric => "icons/file_icons/file.svg", @@ -159,34 +167,36 @@ impl Icon { Icon::Hash => "icons/hash.svg", Icon::InlayHint => "icons/inlay_hint.svg", Icon::Link => "icons/link.svg", - Icon::MagicWand => "icons/magic-wand.svg", + Icon::MagicWand => "icons/magic_wand.svg", Icon::MagnifyingGlass => "icons/magnifying_glass.svg", - Icon::MailOpen => "icons/mail-open.svg", + Icon::MailOpen => "icons/mail_open.svg", Icon::Maximize => "icons/maximize.svg", - Icon::Minimize => "icons/minimize.svg", Icon::Menu => "icons/menu.svg", Icon::MessageBubbles => "icons/conversations.svg", Icon::Mic => "icons/mic.svg", - Icon::MicMute => "icons/mic-mute.svg", + Icon::MicMute => "icons/mic_mute.svg", + Icon::Minimize => "icons/minimize.svg", + Icon::Option => "icons/option.svg", + Icon::PageDown => "icons/page_down.svg", + Icon::PageUp => "icons/page_up.svg", Icon::Plus => "icons/plus.svg", Icon::Public => "icons/public.svg", Icon::Quote => "icons/quote.svg", Icon::Replace => "icons/replace.svg", Icon::ReplaceAll => "icons/replace_all.svg", Icon::ReplaceNext => "icons/replace_next.svg", + Icon::Return => "icons/return.svg", Icon::Screen => "icons/desktop.svg", - Icon::SelectAll => "icons/select-all.svg", - Icon::Split => "icons/split.svg", + Icon::SelectAll => "icons/select_all.svg", + Icon::Shift => "icons/shift.svg", Icon::Snip => "icons/snip.svg", + Icon::Space => "icons/space.svg", + Icon::Split => "icons/split.svg", + Icon::Tab => "icons/tab.svg", Icon::Terminal => "icons/terminal.svg", + Icon::Update => "icons/update.svg", Icon::WholeWord => "icons/word_search.svg", Icon::XCircle => "icons/error.svg", - Icon::Command => "icons/command.svg", - Icon::Control => "icons/control.svg", - Icon::Shift => "icons/shift.svg", - Icon::Option => "icons/option.svg", - Icon::Return => "icons/return.svg", - Icon::Update => "icons/update.svg", Icon::ZedXCopilot => "icons/zed_x_copilot.svg", } } diff --git a/crates/ui/src/components/keybinding.rs b/crates/ui/src/components/keybinding.rs index a07ce1116cebc9cf5bfb2be9a0c8948196be3e02..671f9810831649f8f83dac2e25f88f2223febc40 100644 --- a/crates/ui/src/components/keybinding.rs +++ b/crates/ui/src/components/keybinding.rs @@ -21,9 +21,9 @@ impl RenderOnce for KeyBinding { h_stack() .flex_none() .gap_0p5() - .bg(cx.theme().colors().element_background) .p_0p5() .rounded_sm() + .text_color(cx.theme().colors().text_muted) .when(keystroke.modifiers.function, |el| el.child(Key::new("fn"))) .when(keystroke.modifiers.control, |el| { el.child(KeyIcon::new(Icon::Control)) @@ -70,6 +70,13 @@ impl KeyBinding { "down" => Some(Icon::ArrowDown), "backspace" => Some(Icon::Backspace), "delete" => Some(Icon::Delete), + "return" => Some(Icon::Return), + "enter" => Some(Icon::Return), + "tab" => Some(Icon::Tab), + "space" => Some(Icon::Space), + "escape" => Some(Icon::Escape), + "pagedown" => Some(Icon::PageDown), + "pageup" => Some(Icon::PageUp), _ => None, } } @@ -100,7 +107,7 @@ impl RenderOnce for Key { .h(rems(14. / 16.)) .text_ui() .line_height(relative(1.)) - .text_color(cx.theme().colors().text) + .text_color(cx.theme().colors().text_muted) .child(self.key.clone()) } } @@ -118,9 +125,11 @@ pub struct KeyIcon { impl RenderOnce for KeyIcon { fn render(self, _cx: &mut WindowContext) -> impl IntoElement { - div() - .w(rems(14. / 16.)) - .child(IconElement::new(self.icon).size(IconSize::Small)) + div().w(rems(14. / 16.)).child( + IconElement::new(self.icon) + .size(IconSize::Small) + .color(Color::Muted), + ) } }