From 33d982b08aa5c6dbcce5dfb164fa2c84086a11c8 Mon Sep 17 00:00:00 2001 From: Andrey Kuzmin Date: Tue, 6 Feb 2024 16:25:38 +0100 Subject: [PATCH] Add Elm file icon (#7440) Tried to match the existing file icons in Zed as much as possible. This is how it looks: | dark | light | |---|----| | Screenshot 2024-02-06 at 15 03 57 | Screenshot 2024-02-06 at 15 03 14 | The main challenge is that the tangram is visually quite heavy and detailed. The existing icons in Zed are designed in a 14px bounding box, but are a bit smaller themselves. I guess the extra space is reserved for hanging elements, it probably doesn't make sense to occupy the whole area. Simply scaling down an available SVG of the tangram didn't work well. The individual shapes were not recognizable because the spacing between them was too thin. I tried removing the spacing and applying different opacities for each shape, but that didn't yield enough contrast between the shapes either. The second approach was to just use the outlines. It sort of worked, but looked a bit messy in the places when the outlines are denser than the tangram shapes: | dark | light | |---|----| | Screenshot 2024-02-05 at 22 55 46 | Screenshot 2024-02-05 at 22 56 05 | I then tried to remove the main outline and use the maximum space for the tangram. That let me increase the spacing between the shapes. I also rounded them a little bit, to make them look similar to other icons from Zed. The end result looks clean and the shapes are still recognisable. Approaches I tried next to an existing icon from Zed: Screenshot 2024-02-06 at 15 15 33 Release Notes: - Added file type icon for Elm --- assets/icons/file_icons/elm.svg | 9 +++++++++ assets/icons/file_icons/file_types.json | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 assets/icons/file_icons/elm.svg diff --git a/assets/icons/file_icons/elm.svg b/assets/icons/file_icons/elm.svg new file mode 100644 index 0000000000000000000000000000000000000000..3e05cf9d5ca1b02f7cd97d7fcf859e572d16a689 --- /dev/null +++ b/assets/icons/file_icons/elm.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/icons/file_icons/file_types.json b/assets/icons/file_icons/file_types.json index 916ccc89cb1db63c1e383d5f69e5eeed180a41cd..88c1c650235939317a5c896898d8e96f044dbf5c 100644 --- a/assets/icons/file_icons/file_types.json +++ b/assets/icons/file_icons/file_types.json @@ -25,6 +25,7 @@ "doc": "document", "docx": "document", "eex": "elixir", + "elm": "elm", "erl": "erlang", "escript": "erlang", "eslintrc": "eslint", @@ -155,6 +156,9 @@ "elixir": { "icon": "icons/file_icons/elixir.svg" }, + "elm": { + "icon": "icons/file_icons/elm.svg" + }, "erlang": { "icon": "icons/file_icons/erlang.svg" },