diff --git a/assets/icons/add-contact.svg b/assets/icons/add-contact.svg new file mode 100644 index 0000000000000000000000000000000000000000..4fc7790b9dc0d204997cff308d93d2bf4497c678 --- /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 92319af4968f4db4fbb6ea6a23e263b624ddce66..1eac826b5436f5888e0f1a658d795bbc86f6e6c6 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 f44069e49f19e6ca55cda82d3224da4caf940ce3..4fd9e0865d034ee68d248ace4f88faa1fac9260e 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 f50e590fc42e3c92604c07d8e045bea48e52ac22..50e2958b40c669b43f1d2c76e0f9d0695c8c20a6 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 08d4326414489f132cd78036edb65756c3d810ee..a929dab7aae978240db2022c84b45c328d828e36 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 2b75c4364b124d315fbaed2ad3294e90ee7e6138..3cfa8e701252d58970f362223007be96eb21d55d 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 47758db9986751375885d78ed85454129b01d00b..4aaa7567e89a28f361964d88af58f00cb8101b91 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 38761d606eb156fe3ea3043ee26f9c10108df09b..8151dea442d41ad5876eabd3be8cd1893323d595 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 6d3aeadd5fea179c37130af69adff503b1a06cb3..b42f8b4b2e456183c125e01e7587e9bbbae809cb 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 48386749ef5053e3fffdd148e13db4a1c386e56c..16daa1a7deb18a064d268e306f8b2ae17ae7f580 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 1f320bd24ce173151b76d76d97ab326e18f536e9..f0fdcfc29fe4c63c16d1a781052df7a7842aabae 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 237913c37e91494c72002d3a73785871f23ace5f..aeae2fca6270fc05bf7e7d436f64f4cfe2f2a4a5 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,