diff --git a/assets/icons/add-contact.svg b/assets/icons/add-contact.svg new file mode 100644 index 0000000000..4fc7790b9d --- /dev/null +++ b/assets/icons/add-contact.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/themes/cave-dark.json b/assets/themes/cave-dark.json index 92319af496..1eac826b54 100644 --- a/assets/themes/cave-dark.json +++ b/assets/themes/cave-dark.json @@ -1234,12 +1234,18 @@ "width": 1 }, "padding": { - "bottom": 7, + "bottom": 4, "left": 8, "right": 8, - "top": 7 + "top": 4 } }, + "add_contact_icon": { + "margin": { + "left": 6 + }, + "color": "#e2dfe7" + }, "row_height": 28, "tree_branch_color": "#655f6d", "tree_branch_width": 1, diff --git a/assets/themes/cave-light.json b/assets/themes/cave-light.json index f44069e49f..4fd9e0865d 100644 --- a/assets/themes/cave-light.json +++ b/assets/themes/cave-light.json @@ -1234,12 +1234,18 @@ "width": 1 }, "padding": { - "bottom": 7, + "bottom": 4, "left": 8, "right": 8, - "top": 7 + "top": 4 } }, + "add_contact_icon": { + "margin": { + "left": 6 + }, + "color": "#26232a" + }, "row_height": 28, "tree_branch_color": "#7e7887", "tree_branch_width": 1, diff --git a/assets/themes/dark.json b/assets/themes/dark.json index f50e590fc4..50e2958b40 100644 --- a/assets/themes/dark.json +++ b/assets/themes/dark.json @@ -1234,12 +1234,18 @@ "width": 1 }, "padding": { - "bottom": 7, + "bottom": 4, "left": 8, "right": 8, - "top": 7 + "top": 4 } }, + "add_contact_icon": { + "margin": { + "left": 6 + }, + "color": "#c6c6c6" + }, "row_height": 28, "tree_branch_color": "#404040", "tree_branch_width": 1, diff --git a/assets/themes/light.json b/assets/themes/light.json index 08d4326414..a929dab7aa 100644 --- a/assets/themes/light.json +++ b/assets/themes/light.json @@ -1234,12 +1234,18 @@ "width": 1 }, "padding": { - "bottom": 7, + "bottom": 4, "left": 8, "right": 8, - "top": 7 + "top": 4 } }, + "add_contact_icon": { + "margin": { + "left": 6 + }, + "color": "#393939" + }, "row_height": 28, "tree_branch_color": "#e3e3e3", "tree_branch_width": 1, diff --git a/assets/themes/solarized-dark.json b/assets/themes/solarized-dark.json index 2b75c4364b..3cfa8e7012 100644 --- a/assets/themes/solarized-dark.json +++ b/assets/themes/solarized-dark.json @@ -1234,12 +1234,18 @@ "width": 1 }, "padding": { - "bottom": 7, + "bottom": 4, "left": 8, "right": 8, - "top": 7 + "top": 4 } }, + "add_contact_icon": { + "margin": { + "left": 6 + }, + "color": "#eee8d5" + }, "row_height": 28, "tree_branch_color": "#657b83", "tree_branch_width": 1, diff --git a/assets/themes/solarized-light.json b/assets/themes/solarized-light.json index 47758db998..4aaa7567e8 100644 --- a/assets/themes/solarized-light.json +++ b/assets/themes/solarized-light.json @@ -1234,12 +1234,18 @@ "width": 1 }, "padding": { - "bottom": 7, + "bottom": 4, "left": 8, "right": 8, - "top": 7 + "top": 4 } }, + "add_contact_icon": { + "margin": { + "left": 6 + }, + "color": "#073642" + }, "row_height": 28, "tree_branch_color": "#839496", "tree_branch_width": 1, diff --git a/assets/themes/sulphurpool-dark.json b/assets/themes/sulphurpool-dark.json index 38761d606e..8151dea442 100644 --- a/assets/themes/sulphurpool-dark.json +++ b/assets/themes/sulphurpool-dark.json @@ -1234,12 +1234,18 @@ "width": 1 }, "padding": { - "bottom": 7, + "bottom": 4, "left": 8, "right": 8, - "top": 7 + "top": 4 } }, + "add_contact_icon": { + "margin": { + "left": 6 + }, + "color": "#dfe2f1" + }, "row_height": 28, "tree_branch_color": "#6b7394", "tree_branch_width": 1, diff --git a/assets/themes/sulphurpool-light.json b/assets/themes/sulphurpool-light.json index 6d3aeadd5f..b42f8b4b2e 100644 --- a/assets/themes/sulphurpool-light.json +++ b/assets/themes/sulphurpool-light.json @@ -1234,12 +1234,18 @@ "width": 1 }, "padding": { - "bottom": 7, + "bottom": 4, "left": 8, "right": 8, - "top": 7 + "top": 4 } }, + "add_contact_icon": { + "margin": { + "left": 6 + }, + "color": "#293256" + }, "row_height": 28, "tree_branch_color": "#898ea4", "tree_branch_width": 1, diff --git a/crates/contacts_panel/src/contacts_panel.rs b/crates/contacts_panel/src/contacts_panel.rs index 48386749ef..16daa1a7de 100644 --- a/crates/contacts_panel/src/contacts_panel.rs +++ b/crates/contacts_panel/src/contacts_panel.rs @@ -711,8 +711,26 @@ impl View for ContactsPanel { Container::new( Flex::column() .with_child( - Container::new(ChildView::new(self.user_query_editor.clone()).boxed()) - .with_style(theme.user_query_editor.container) + Flex::row() + .with_child( + ChildView::new(self.user_query_editor.clone()) + .contained() + .with_style(theme.user_query_editor.container) + .flex(1., true) + .boxed(), + ) + .with_child( + Svg::new("icons/add-contact.svg") + .with_color(theme.add_contact_icon.color) + .constrained() + .with_height(12.) + .contained() + .with_style(theme.add_contact_icon.container) + .aligned() + .boxed(), + ) + .constrained() + .with_height(32.) .boxed(), ) .with_child(List::new(self.list_state.clone()).flex(1., false).boxed()) diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index 1f320bd24c..f0fdcfc29f 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -236,6 +236,7 @@ pub struct ContactsPanel { pub container: ContainerStyle, pub header: ContainedText, pub user_query_editor: FieldEditor, + pub add_contact_icon: AddContactIcon, pub row_height: f32, pub contact_avatar: ImageStyle, pub contact_username: ContainedText, @@ -248,6 +249,13 @@ pub struct ContactsPanel { pub hovered_unshared_project: ProjectRow, } +#[derive(Deserialize, Default)] +pub struct AddContactIcon { + #[serde(flatten)] + pub container: ContainerStyle, + pub color: Color, +} + #[derive(Deserialize, Default)] pub struct ProjectRow { #[serde(flatten)] diff --git a/styles/src/styleTree/contactsPanel.ts b/styles/src/styleTree/contactsPanel.ts index 237913c37e..aeae2fca62 100644 --- a/styles/src/styleTree/contactsPanel.ts +++ b/styles/src/styleTree/contactsPanel.ts @@ -1,6 +1,6 @@ import Theme from "../themes/theme"; import { panel } from "./app"; -import { backgroundColor, border, borderColor, player, text } from "./components"; +import { backgroundColor, border, borderColor, iconColor, player, text } from "./components"; export default function(theme: Theme) { const project = { @@ -41,12 +41,16 @@ export default function(theme: Theme) { selection: player(theme, 1).selection, border: border(theme, "secondary"), padding: { - bottom: 7, + bottom: 4, left: 8, right: 8, - top: 7, + top: 4, }, }, + addContactIcon: { + margin: { left: 6 }, + color: iconColor(theme, "primary") + }, rowHeight: 28, treeBranchColor: borderColor(theme, "muted"), treeBranchWidth: 1,