From 0f9ff575689276de5b7b4cb07c0ce776b5d89a6c Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 13 Sep 2022 17:00:11 +0200 Subject: [PATCH] Show the correct icon in status bar --- assets/icons/zed_22.svg | 4 ++++ assets/icons/zed_32.svg | 22 ------------------- .../src/contacts_status_item.rs | 22 +++---------------- 3 files changed, 7 insertions(+), 41 deletions(-) create mode 100644 assets/icons/zed_22.svg delete mode 100644 assets/icons/zed_32.svg diff --git a/assets/icons/zed_22.svg b/assets/icons/zed_22.svg new file mode 100644 index 0000000000..68e7dc8e57 --- /dev/null +++ b/assets/icons/zed_22.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/assets/icons/zed_32.svg b/assets/icons/zed_32.svg deleted file mode 100644 index f8c0c537c3..0000000000 --- a/assets/icons/zed_32.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/contacts_status_item/src/contacts_status_item.rs b/crates/contacts_status_item/src/contacts_status_item.rs index 5905c9ad12..c7cd9c3a4a 100644 --- a/crates/contacts_status_item/src/contacts_status_item.rs +++ b/crates/contacts_status_item/src/contacts_status_item.rs @@ -1,4 +1,4 @@ -use gpui::{color::Color, elements::*, Entity, RenderContext, View}; +use gpui::{elements::*, Entity, RenderContext, View}; pub struct ContactsStatusItem; @@ -11,24 +11,8 @@ impl View for ContactsStatusItem { "ContactsStatusItem" } - fn render(&mut self, cx: &mut RenderContext) -> ElementBox { - MouseEventHandler::new::(0, cx, |state, cx| { - Svg::new("icons/zed_32.svg") - .with_color(if state.clicked.is_some() { - Color::red() - } else { - Color::blue() - }) - .boxed() - }) - .on_down(gpui::MouseButton::Left, |_, _| {}) - .on_down_out(gpui::MouseButton::Left, |_, _| {}) - .on_up(gpui::MouseButton::Left, |_, _| {}) - .on_up_out(gpui::MouseButton::Left, |_, _| {}) - .aligned() - .contained() - .with_background_color(Color::green()) - .boxed() + fn render(&mut self, _: &mut RenderContext) -> ElementBox { + Svg::new("icons/zed_22.svg").aligned().boxed() } }