Add icon sets for sizes 8, 12 and 16, remove old icons
This commit is contained in:
@@ -15,9 +15,9 @@ use workspace::{ItemHandle, StatusItemView, Workspace};
|
||||
|
||||
actions!(lsp_status, [ShowErrorMessage]);
|
||||
|
||||
const DOWNLOAD_ICON: &'static str = "icons/download-solid-14.svg";
|
||||
const WARNING_ICON: &'static str = "icons/warning-solid-14.svg";
|
||||
const DONE_ICON: &'static str = "icons/accept.svg";
|
||||
const DOWNLOAD_ICON: &'static str = "icons/download_12.svg";
|
||||
const WARNING_ICON: &'static str = "icons/triangle_exclamation_12.svg";
|
||||
const DONE_ICON: &'static str = "icons/circle_check_12.svg";
|
||||
|
||||
pub enum Event {
|
||||
ShowError { lsp_name: Arc<str>, error: String },
|
||||
|
||||
@@ -49,7 +49,7 @@ impl View for UpdateNotification {
|
||||
.with_child(
|
||||
MouseEventHandler::new::<Cancel, _, _>(0, cx, |state, _| {
|
||||
let style = theme.dismiss_button.style_for(state, false);
|
||||
Svg::new("icons/decline.svg")
|
||||
Svg::new("icons/x_mark_thin_8.svg")
|
||||
.with_color(style.color)
|
||||
.constrained()
|
||||
.with_width(style.icon_width)
|
||||
|
||||
@@ -115,10 +115,10 @@ impl PickerDelegate for ContactFinder {
|
||||
|
||||
let icon_path = match request_status {
|
||||
ContactRequestStatus::None | ContactRequestStatus::RequestReceived => {
|
||||
"icons/accept.svg"
|
||||
"icons/check_8.svg"
|
||||
}
|
||||
ContactRequestStatus::RequestSent | ContactRequestStatus::RequestAccepted => {
|
||||
"icons/decline.svg"
|
||||
"icons/x_mark_8.svg"
|
||||
}
|
||||
};
|
||||
let button_style = if self.user_store.read(cx).is_contact_request_pending(&user) {
|
||||
|
||||
@@ -281,9 +281,9 @@ impl ContactsPanel {
|
||||
Flex::row()
|
||||
.with_child(
|
||||
Svg::new(if is_collapsed {
|
||||
"icons/disclosure-closed.svg"
|
||||
"icons/chevron_right_8.svg"
|
||||
} else {
|
||||
"icons/disclosure-open.svg"
|
||||
"icons/chevron_down_8.svg"
|
||||
})
|
||||
.with_color(header_style.text.color)
|
||||
.constrained()
|
||||
@@ -433,7 +433,7 @@ impl ContactsPanel {
|
||||
if is_going_offline {
|
||||
icon_style.color = theme.disabled_button.color;
|
||||
}
|
||||
render_icon_button(&icon_style, "icons/lock-8.svg")
|
||||
render_icon_button(&icon_style, "icons/lock_8.svg")
|
||||
.aligned()
|
||||
.boxed()
|
||||
},
|
||||
@@ -551,7 +551,7 @@ impl ContactsPanel {
|
||||
if is_going_online {
|
||||
style.color = theme.disabled_button.color;
|
||||
}
|
||||
render_icon_button(&style, "icons/lock-8.svg")
|
||||
render_icon_button(&style, "icons/lock_8.svg")
|
||||
.aligned()
|
||||
.constrained()
|
||||
.with_width(host_avatar_height)
|
||||
@@ -640,7 +640,7 @@ impl ContactsPanel {
|
||||
} else {
|
||||
&theme.contact_button.style_for(mouse_state, false)
|
||||
};
|
||||
render_icon_button(button_style, "icons/decline.svg")
|
||||
render_icon_button(button_style, "icons/x_mark_8.svg")
|
||||
.aligned()
|
||||
// .flex_float()
|
||||
.boxed()
|
||||
@@ -662,7 +662,7 @@ impl ContactsPanel {
|
||||
} else {
|
||||
&theme.contact_button.style_for(mouse_state, false)
|
||||
};
|
||||
render_icon_button(button_style, "icons/accept.svg")
|
||||
render_icon_button(button_style, "icons/check_8.svg")
|
||||
.aligned()
|
||||
.flex_float()
|
||||
.boxed()
|
||||
@@ -684,7 +684,7 @@ impl ContactsPanel {
|
||||
} else {
|
||||
&theme.contact_button.style_for(mouse_state, false)
|
||||
};
|
||||
render_icon_button(button_style, "icons/decline.svg")
|
||||
render_icon_button(button_style, "icons/x_mark_8.svg")
|
||||
.aligned()
|
||||
.flex_float()
|
||||
.boxed()
|
||||
@@ -1068,10 +1068,10 @@ impl View for ContactsPanel {
|
||||
)
|
||||
.with_child(
|
||||
MouseEventHandler::new::<AddContact, _, _>(0, cx, |_, _| {
|
||||
Svg::new("icons/add-contact.svg")
|
||||
Svg::new("icons/user_plus_16.svg")
|
||||
.with_color(theme.add_contact_button.color)
|
||||
.constrained()
|
||||
.with_height(12.)
|
||||
.with_height(16.)
|
||||
.contained()
|
||||
.with_style(theme.add_contact_button.container)
|
||||
.aligned()
|
||||
|
||||
@@ -55,7 +55,7 @@ pub fn render_user_notification<V: View, A: Action + Clone>(
|
||||
MouseEventHandler::new::<Dismiss, _, _>(user.id as usize, cx, |state, _| {
|
||||
render_icon_button(
|
||||
theme.dismiss_button.style_for(state, false),
|
||||
"icons/decline.svg",
|
||||
"icons/x_mark_thin_8.svg",
|
||||
)
|
||||
.boxed()
|
||||
})
|
||||
|
||||
@@ -621,10 +621,10 @@ fn diagnostic_header_renderer(diagnostic: Diagnostic) -> RenderBlock {
|
||||
let font_size = (style.text_scale_factor * settings.buffer_font_size).round();
|
||||
let icon_width = cx.em_width * style.icon_width_factor;
|
||||
let icon = if diagnostic.severity == DiagnosticSeverity::ERROR {
|
||||
Svg::new("icons/diagnostic-error-10.svg")
|
||||
Svg::new("icons/circle_x_mark_12.svg")
|
||||
.with_color(theme.error_diagnostic.message.text.color)
|
||||
} else {
|
||||
Svg::new("icons/diagnostic-warning-10.svg")
|
||||
Svg::new("icons/triangle_exclamation_12.svg")
|
||||
.with_color(theme.warning_diagnostic.message.text.color)
|
||||
};
|
||||
|
||||
@@ -677,7 +677,7 @@ pub(crate) fn render_summary(
|
||||
let summary_spacing = theme.tab_summary_spacing;
|
||||
Flex::row()
|
||||
.with_children([
|
||||
Svg::new("icons/diagnostic-summary-error.svg")
|
||||
Svg::new("icons/circle_x_mark_12.svg")
|
||||
.with_color(text_style.color)
|
||||
.constrained()
|
||||
.with_width(icon_width)
|
||||
@@ -694,7 +694,7 @@ pub(crate) fn render_summary(
|
||||
)
|
||||
.aligned()
|
||||
.boxed(),
|
||||
Svg::new("icons/diagnostic-summary-warning.svg")
|
||||
Svg::new("icons/triangle_exclamation_12.svg")
|
||||
.with_color(text_style.color)
|
||||
.constrained()
|
||||
.with_width(icon_width)
|
||||
|
||||
@@ -101,7 +101,7 @@ impl View for DiagnosticIndicator {
|
||||
let mut summary_row = Flex::row();
|
||||
if self.summary.error_count > 0 {
|
||||
summary_row.add_children([
|
||||
Svg::new("icons/Icon16CircleXMark.svg")
|
||||
Svg::new("icons/circle_x_mark_16.svg")
|
||||
.with_color(style.icon_color_error)
|
||||
.constrained()
|
||||
.with_width(style.icon_width)
|
||||
@@ -117,7 +117,7 @@ impl View for DiagnosticIndicator {
|
||||
|
||||
if self.summary.warning_count > 0 {
|
||||
summary_row.add_children([
|
||||
Svg::new("icons/Icon16TriangleExclamation.svg")
|
||||
Svg::new("icons/triangle_exclamation_16.svg")
|
||||
.with_color(style.icon_color_warning)
|
||||
.constrained()
|
||||
.with_width(style.icon_width)
|
||||
@@ -138,7 +138,7 @@ impl View for DiagnosticIndicator {
|
||||
|
||||
if self.summary.error_count == 0 && self.summary.warning_count == 0 {
|
||||
summary_row.add_child(
|
||||
Svg::new("icons/Icon16CircleCheck.svg")
|
||||
Svg::new("icons/circle_check_16.svg")
|
||||
.with_color(style.icon_color_ok)
|
||||
.constrained()
|
||||
.with_width(style.icon_width)
|
||||
|
||||
@@ -2660,7 +2660,7 @@ impl Editor {
|
||||
enum Tag {}
|
||||
Some(
|
||||
MouseEventHandler::new::<Tag, _, _>(0, cx, |_, _| {
|
||||
Svg::new("icons/zap.svg")
|
||||
Svg::new("icons/bolt_8.svg")
|
||||
.with_color(style.code_actions_indicator)
|
||||
.boxed()
|
||||
})
|
||||
|
||||
@@ -936,7 +936,7 @@ impl EditorElement {
|
||||
cx.render(&editor, |_, cx| {
|
||||
MouseEventHandler::new::<JumpIcon, _, _>(*key, cx, |state, _| {
|
||||
let style = style.jump_icon.style_for(state, false);
|
||||
Svg::new("icons/jump.svg")
|
||||
Svg::new("icons/arrow_up_right_8.svg")
|
||||
.with_color(style.color)
|
||||
.constrained()
|
||||
.with_width(style.icon_width)
|
||||
|
||||
@@ -1013,11 +1013,11 @@ impl ProjectPanel {
|
||||
.with_child(
|
||||
ConstrainedBox::new(if kind == EntryKind::Dir {
|
||||
if details.is_expanded {
|
||||
Svg::new("icons/disclosure-open.svg")
|
||||
Svg::new("icons/chevron_right_8.svg")
|
||||
.with_color(style.icon_color)
|
||||
.boxed()
|
||||
} else {
|
||||
Svg::new("icons/disclosure-closed.svg")
|
||||
Svg::new("icons/chevron_down_8.svg")
|
||||
.with_color(style.icon_color)
|
||||
.boxed()
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ impl Item for ProjectSearchView {
|
||||
let search_theme = &settings.theme.search;
|
||||
Flex::row()
|
||||
.with_child(
|
||||
Svg::new("icons/magnifier.svg")
|
||||
Svg::new("icons/magnifying_glass_12.svg")
|
||||
.with_color(tab_theme.label.text.color)
|
||||
.constrained()
|
||||
.with_width(search_theme.tab_icon_width)
|
||||
|
||||
@@ -332,7 +332,7 @@ impl Item for Terminal {
|
||||
|
||||
if self.has_bell {
|
||||
flex.add_child(
|
||||
Svg::new("icons/zap.svg") //TODO: Swap out for a better icon, or at least resize this
|
||||
Svg::new("icons/bolt_12.svg") //TODO: Swap out for a better icon, or at least resize this
|
||||
.with_color(tab_theme.label.text.color)
|
||||
.constrained()
|
||||
.with_width(search_theme.tab_icon_width)
|
||||
|
||||
@@ -915,7 +915,7 @@ impl Pane {
|
||||
ConstrainedBox::new(if mouse_state.hovered {
|
||||
let item_id = item.id();
|
||||
enum TabCloseButton {}
|
||||
let icon = Svg::new("icons/x.svg");
|
||||
let icon = Svg::new("icons/x_mark_thin_8.svg");
|
||||
MouseEventHandler::new::<TabCloseButton, _, _>(
|
||||
item_id,
|
||||
cx,
|
||||
@@ -1002,7 +1002,7 @@ impl View for Pane {
|
||||
let theme = &cx.global::<Settings>().theme.workspace;
|
||||
let style =
|
||||
theme.pane_button.style_for(mouse_state, false);
|
||||
Svg::new("icons/split.svg")
|
||||
Svg::new("icons/split_12.svg")
|
||||
.with_color(style.color)
|
||||
.constrained()
|
||||
.with_width(style.icon_width)
|
||||
|
||||
@@ -118,7 +118,7 @@ impl View for Toolbar {
|
||||
.with_child(
|
||||
Flex::row()
|
||||
.with_child(nav_button(
|
||||
"icons/Icon16ArrowLeft.svg",
|
||||
"icons/arrow_left_16.svg",
|
||||
button_style,
|
||||
tooltip_style.clone(),
|
||||
enable_go_backward,
|
||||
@@ -131,7 +131,7 @@ impl View for Toolbar {
|
||||
cx,
|
||||
))
|
||||
.with_child(nav_button(
|
||||
"icons/Icon16ArrowRight.svg",
|
||||
"icons/arrow_right_16.svg",
|
||||
button_style,
|
||||
tooltip_style.clone(),
|
||||
enable_go_forward,
|
||||
|
||||
@@ -1795,7 +1795,7 @@ impl Workspace {
|
||||
Container::new(
|
||||
Align::new(
|
||||
ConstrainedBox::new(
|
||||
Svg::new("icons/offline-14.svg")
|
||||
Svg::new("icons/cloud_slash_12.svg")
|
||||
.with_color(theme.workspace.titlebar.offline_icon.color)
|
||||
.boxed(),
|
||||
)
|
||||
|
||||
@@ -244,7 +244,7 @@ pub fn initialize_workspace(
|
||||
|
||||
workspace.left_sidebar().update(cx, |sidebar, cx| {
|
||||
sidebar.add_item(
|
||||
"icons/Icon16FolderTree.svg",
|
||||
"icons/folder_tree_16.svg",
|
||||
"Project Panel".to_string(),
|
||||
project_panel.into(),
|
||||
cx,
|
||||
@@ -252,7 +252,7 @@ pub fn initialize_workspace(
|
||||
});
|
||||
workspace.right_sidebar().update(cx, |sidebar, cx| {
|
||||
sidebar.add_item(
|
||||
"icons/Icon16UserGroup.svg",
|
||||
"icons/user_group_16.svg",
|
||||
"Contacts Panel".to_string(),
|
||||
contact_panel.into(),
|
||||
cx,
|
||||
|
||||
Reference in New Issue
Block a user