From f2d46e0ff954d14ca6ed40569ffef2412ea9ae9b Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 14 Aug 2023 15:57:31 -0400 Subject: [PATCH] Use new icons in channel panel --- assets/icons/hash.svg | 6 ++++++ assets/icons/html.svg | 5 +++++ assets/icons/lock.svg | 6 ++++++ crates/collab_ui/src/collab_panel.rs | 26 +++++++++++++------------- styles/src/style_tree/collab_panel.ts | 2 +- 5 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 assets/icons/hash.svg create mode 100644 assets/icons/html.svg create mode 100644 assets/icons/lock.svg diff --git a/assets/icons/hash.svg b/assets/icons/hash.svg new file mode 100644 index 0000000000000000000000000000000000000000..f685245ed3c2a2881b2fe1377bf029e8e515ae94 --- /dev/null +++ b/assets/icons/hash.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/html.svg b/assets/icons/html.svg new file mode 100644 index 0000000000000000000000000000000000000000..1e676fe313401fc137813827df03cc2c60851df0 --- /dev/null +++ b/assets/icons/html.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/lock.svg b/assets/icons/lock.svg new file mode 100644 index 0000000000000000000000000000000000000000..652f45a7e843795c288fdaaf4951d40943e3805d --- /dev/null +++ b/assets/icons/lock.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/crates/collab_ui/src/collab_panel.rs b/crates/collab_ui/src/collab_panel.rs index 274eeb9f2dbe7bec10504e824bb1aba0537b3bd0..8c63649ef9b41a1b4794ce75ce364f76a85ee3cd 100644 --- a/crates/collab_ui/src/collab_panel.rs +++ b/crates/collab_ui/src/collab_panel.rs @@ -1189,7 +1189,7 @@ impl CollabPanel { .collab_panel .leave_call_button .style_for(is_selected, state), - "icons/radix/exit.svg", + "icons/exit.svg", ) }) .with_cursor_style(CursorStyle::PointingHand) @@ -1233,7 +1233,7 @@ impl CollabPanel { .collab_panel .add_contact_button .style_for(is_selected, state), - "icons/plus_16.svg", + "icons/plus.svg", ) }) .with_cursor_style(CursorStyle::PointingHand) @@ -1266,9 +1266,9 @@ impl CollabPanel { .with_children(if can_collapse { Some( Svg::new(if is_collapsed { - "icons/chevron_right_8.svg" + "icons/chevron_right.svg" } else { - "icons/chevron_down_8.svg" + "icons/chevron_down.svg" }) .with_color(header_style.text.color) .constrained() @@ -1364,7 +1364,7 @@ impl CollabPanel { cx, |mouse_state, _| { let button_style = theme.contact_button.style_for(mouse_state); - render_icon_button(button_style, "icons/x_mark_8.svg") + render_icon_button(button_style, "icons/x.svg") .aligned() .flex_float() }, @@ -1415,7 +1415,7 @@ impl CollabPanel { let style = theme.list_empty_state.style_for(is_selected, state); Flex::row() .with_child( - Svg::new("icons/plus_16.svg") + Svg::new("icons/plus.svg") .with_color(theme.list_empty_icon.color) .constrained() .with_width(theme.list_empty_icon.width) @@ -1446,7 +1446,7 @@ impl CollabPanel { ) -> AnyElement { Flex::row() .with_child( - Svg::new("icons/channel_hash.svg") + Svg::new("icons/hash.svg") .with_color(theme.collab_panel.channel_hash.color) .constrained() .with_width(theme.collab_panel.channel_hash.width) @@ -1506,7 +1506,7 @@ impl CollabPanel { MouseEventHandler::::new(channel.id as usize, cx, |state, cx| { Flex::row() .with_child( - Svg::new("icons/channel_hash.svg") + Svg::new("icons/hash.svg") .with_color(theme.channel_hash.color) .constrained() .with_width(theme.channel_hash.width) @@ -1572,7 +1572,7 @@ impl CollabPanel { Flex::row() .with_child( - Svg::new("icons/channel_hash.svg") + Svg::new("icons/hash.svg") .with_color(theme.channel_hash.color) .constrained() .with_width(theme.channel_hash.width) @@ -1597,7 +1597,7 @@ impl CollabPanel { } else { theme.contact_button.style_for(mouse_state) }; - render_icon_button(button_style, "icons/x_mark_8.svg").aligned() + render_icon_button(button_style, "icons/x.svg").aligned() }, ) .with_cursor_style(CursorStyle::PointingHand) @@ -1686,7 +1686,7 @@ impl CollabPanel { } else { theme.contact_button.style_for(mouse_state) }; - render_icon_button(button_style, "icons/x_mark_8.svg").aligned() + render_icon_button(button_style, "icons/x.svg").aligned() }) .with_cursor_style(CursorStyle::PointingHand) .on_click(MouseButton::Left, move |_, this, cx| { @@ -1720,7 +1720,7 @@ impl CollabPanel { } else { theme.contact_button.style_for(mouse_state) }; - render_icon_button(button_style, "icons/x_mark_8.svg") + render_icon_button(button_style, "icons/x.svg") .aligned() .flex_float() }) @@ -2340,7 +2340,7 @@ impl Panel for CollabPanel { fn icon_path(&self, cx: &gpui::WindowContext) -> Option<&'static str> { settings::get::(cx) .button - .then(|| "icons/speech_bubble_12.svg") + .then(|| "icons/conversations.svg") } fn icon_tooltip(&self) -> (String, Option>) { diff --git a/styles/src/style_tree/collab_panel.ts b/styles/src/style_tree/collab_panel.ts index b8969e2b9a32d52467af7384af8f5d3846b06810..648fa141a5f9df2e58ef40b9fe0281fd94828c09 100644 --- a/styles/src/style_tree/collab_panel.ts +++ b/styles/src/style_tree/collab_panel.ts @@ -132,7 +132,7 @@ export default function contacts_panel(): any { leave_call_button: header_icon_button, row_height: ITEM_HEIGHT, channel_indent: INDENT_SIZE, - section_icon_size: 8, + section_icon_size: 14, header_row: { ...text(layer, "ui_sans", { size: "sm", weight: "bold" }), margin: { top: SPACING },