From 124604c019a1359f7445fedca2b1f3a1438386e9 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Wed, 3 Jan 2024 11:28:31 -0500 Subject: [PATCH] Add pageup and pagedown icons and keybinding icons --- assets/icons/page-down.svg | 6 ++++++ assets/icons/page-up.svg | 13 +++++++++++++ crates/ui2/src/components/icon.rs | 4 ++++ crates/ui2/src/components/keybinding.rs | 10 ++++++---- 4 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 assets/icons/page-down.svg create mode 100644 assets/icons/page-up.svg diff --git a/assets/icons/page-down.svg b/assets/icons/page-down.svg new file mode 100644 index 0000000000..765f36b26a --- /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 0000000000..f555165d2d --- /dev/null +++ b/assets/icons/page-up.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/crates/ui2/src/components/icon.rs b/crates/ui2/src/components/icon.rs index d445b3d702..b252715aad 100644 --- a/crates/ui2/src/components/icon.rs +++ b/crates/ui2/src/components/icon.rs @@ -87,6 +87,8 @@ pub enum Icon { MicMute, Minimize, Option, + PageDown, + PageUp, Plus, Public, Quote, @@ -175,6 +177,8 @@ impl Icon { 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", diff --git a/crates/ui2/src/components/keybinding.rs b/crates/ui2/src/components/keybinding.rs index 434f3aeb5e..4c51e0f742 100644 --- a/crates/ui2/src/components/keybinding.rs +++ b/crates/ui2/src/components/keybinding.rs @@ -66,17 +66,19 @@ impl KeyBinding { fn icon_for_key(keystroke: &Keystroke) -> Option { match keystroke.key.as_str() { - "left" => Some(Icon::ArrowLeft), - "right" => Some(Icon::ArrowRight), - "up" => Some(Icon::ArrowUp), - "down" => Some(Icon::ArrowDown), "backspace" => Some(Icon::Backspace), "delete" => Some(Icon::Delete), + "down" => Some(Icon::ArrowDown), "enter" => Some(Icon::Return), "escape" => Some(Icon::Escape), + "left" => Some(Icon::ArrowLeft), + "pagedown" => Some(Icon::PageDown), + "pageup" => Some(Icon::PageUp), "return" => Some(Icon::Return), + "right" => Some(Icon::ArrowRight), "space" => Some(Icon::Space), "tab" => Some(Icon::Tab), + "up" => Some(Icon::ArrowUp), _ => None, } }