.config icon

This commit is contained in:
Matt Parker
2025-11-29 11:35:58 +10:00
parent 5763c9efa1
commit 74abd0e9db
3 changed files with 75 additions and 3 deletions

View File

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
role="img"
aria-label="folder icon"
version="1.1"
id="svg1"
sodipodi:docname="ConfigFile.svg"
inkscape:version="1.4.2 (f4327f4, 2025-05-13)"
xml:space="preserve"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1" /><sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:zoom="16"
inkscape:cx="-13.4375"
inkscape:cy="22.40625"
inkscape:window-width="2560"
inkscape:window-height="1369"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" /><!-- background (transparent) --><!-- folder body (filled) --><path
d="m 11.397101,3.5546602 h 5.654692 c 0.662742,0 1.2,0.5372583 1.2,1.1999999 V 19.24534 c 0,0.662742 -0.537258,1.2 -1.2,1.2 H 6.948207 c -0.662742,0 -1.2,-0.537258 -1.2,-1.2 V 8.3649754 Z"
fill="#4b4d50"
stroke="#dfe5e9"
stroke-width="0.8"
stroke-linejoin="round"
filter="url(#glow)"
id="path1"
sodipodi:nodetypes="csssssscc"
style="display:none;stroke-width:1;stroke-dasharray:none" /><path
style="display:none;fill:none;fill-opacity:1;stroke:#dfe5e9;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 5.748207,8.3649754 5.648118,0.010562 7.76e-4,-4.8208776"
id="path2"
sodipodi:nodetypes="ccc" /><path
d="m 19.466689,17.304324 c 0.022,-0.165028 0.033,-0.335556 0.033,-0.517086 0,-0.176028 -0.01104,-0.352057 -0.0385,-0.517085 l 1.116684,-0.869144 c 0.09902,-0.07701 0.126526,-0.225537 0.06601,-0.335555 l -1.056181,-1.826302 c -0.06601,-0.121019 -0.203533,-0.159526 -0.324554,-0.121019 l -1.314717,0.528089 C 17.673393,13.437185 17.381844,13.261156 17.05729,13.129134 l -0.198032,-1.39723 c -0.022,-0.132019 -0.132019,-0.225538 -0.264043,-0.225538 h -2.112349 c -0.132019,0 -0.236539,0.09352 -0.258543,0.225538 l -0.198032,1.39723 c -0.324554,0.132018 -0.621603,0.313552 -0.891149,0.517086 l -1.314716,-0.528088 c -0.121019,-0.04401 -0.258543,0 -0.324554,0.121019 l -1.050673,1.826302 c -0.06601,0.115513 -0.04401,0.258542 0.06601,0.335555 l 1.116686,0.869144 c -0.02751,0.165027 -0.0495,0.346556 -0.0495,0.517085 0,0.170529 0.01104,0.352058 0.0385,0.517085 l -1.116684,0.869144 c -0.09902,0.07701 -0.126526,0.225538 -0.06601,0.335555 l 1.056174,1.826302 c 0.06601,0.121019 0.203533,0.159526 0.324553,0.121019 l 1.314718,-0.528088 c 0.275046,0.209035 0.566592,0.385064 0.891146,0.517086 l 0.198034,1.39723 c 0.02751,0.132019 0.132019,0.225538 0.264043,0.225538 h 2.112349 c 0.132018,0 0.24204,-0.09352 0.258543,-0.225538 l 0.198032,-1.39723 c 0.324554,-0.132018 0.621603,-0.308051 0.891147,-0.517086 l 1.314718,0.528088 c 0.121019,0.04401 0.258542,0 0.324554,-0.121019 l 1.056174,-1.826302 c 0.06601,-0.121019 0.0385,-0.258542 -0.06601,-0.335555 z m -3.927648,1.463242 c -1.089181,0 -1.980328,-0.891147 -1.980328,-1.980328 0,-1.08918 0.891147,-1.980327 1.980328,-1.980327 1.089179,0 1.980327,0.891147 1.980327,1.980327 0,1.089181 -0.891148,1.980328 -1.980327,1.980328 z"
id="path2-1-7"
style="display:inline;fill:#2b3f64;fill-opacity:1;stroke:#030d20;stroke-width:2;stroke-dasharray:none;stroke-opacity:1" /><path
d="m 19.466689,17.304324 c 0.022,-0.165028 0.033,-0.335556 0.033,-0.517086 0,-0.176028 -0.01104,-0.352057 -0.0385,-0.517085 l 1.116684,-0.869144 c 0.09902,-0.07701 0.126526,-0.225537 0.06601,-0.335555 l -1.056181,-1.826302 c -0.06601,-0.121019 -0.203533,-0.159526 -0.324554,-0.121019 l -1.314717,0.528089 C 17.673393,13.437185 17.381844,13.261156 17.05729,13.129134 l -0.198032,-1.39723 c -0.022,-0.132019 -0.132019,-0.225538 -0.264043,-0.225538 h -2.112349 c -0.132019,0 -0.236539,0.09352 -0.258543,0.225538 l -0.198032,1.39723 c -0.324554,0.132018 -0.621603,0.313552 -0.891149,0.517086 l -1.314716,-0.528088 c -0.121019,-0.04401 -0.258543,0 -0.324554,0.121019 l -1.050673,1.826302 c -0.06601,0.115513 -0.04401,0.258542 0.06601,0.335555 l 1.116686,0.869144 c -0.02751,0.165027 -0.0495,0.346556 -0.0495,0.517085 0,0.170529 0.01104,0.352058 0.0385,0.517085 l -1.116684,0.869144 c -0.09902,0.07701 -0.126526,0.225538 -0.06601,0.335555 l 1.056174,1.826302 c 0.06601,0.121019 0.203533,0.159526 0.324553,0.121019 l 1.314718,-0.528088 c 0.275046,0.209035 0.566592,0.385064 0.891146,0.517086 l 0.198034,1.39723 c 0.02751,0.132019 0.132019,0.225538 0.264043,0.225538 h 2.112349 c 0.132018,0 0.24204,-0.09352 0.258543,-0.225538 l 0.198032,-1.39723 c 0.324554,-0.132018 0.621603,-0.308051 0.891147,-0.517086 l 1.314718,0.528088 c 0.121019,0.04401 0.258542,0 0.324554,-0.121019 l 1.056174,-1.826302 c 0.06601,-0.121019 0.0385,-0.258542 -0.06601,-0.335555 z m -3.927648,1.463242 c -1.089181,0 -1.980328,-0.891147 -1.980328,-1.980328 0,-1.08918 0.891147,-1.980327 1.980328,-1.980327 1.089179,0 1.980327,0.891147 1.980327,1.980327 0,1.089181 -0.891148,1.980328 -1.980327,1.980328 z"
id="path2-1"
style="display:inline;fill:#2b3f64;fill-opacity:1;stroke:#5287f1;stroke-width:0.7;stroke-dasharray:none;stroke-opacity:1" /></svg>

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@@ -0,0 +1,18 @@
[remap]
importer="svg"
type="DPITexture"
uid="uid://brsdisqgeah5n"
path="res://.godot/imported/ConfigFile.svg-39ae74f2a4d35fe0ba98fe2abd073aca.dpitex"
[deps]
source_file="res://Features/SolutionExplorer/Resources/FileExtensions/GenericFileAdornments/ConfigFile.svg"
dest_files=["res://.godot/imported/ConfigFile.svg-39ae74f2a4d35fe0ba98fe2abd073aca.dpitex"]
[params]
base_scale=1.0
saturation=1.0
color_map={}
compress=true

View File

@@ -1,5 +1,4 @@
using Godot;
using Godot;
namespace SharpIDE.Godot.Features.SolutionExplorer;
@@ -17,6 +16,7 @@ public partial class SolutionExplorerPanel
private readonly Texture2D _editorConfigFileIcon = ResourceLoader.Load<Texture2D>("uid://5t83l7c7f3g6");
private readonly Texture2D _propsFileOverlayIcon = ResourceLoader.Load<Texture2D>("uid://fa7tdmldi206");
private readonly Texture2D _configFileOverlayIcon = ResourceLoader.Load<Texture2D>("uid://brsdisqgeah5n");
private (Texture2D Icon, Texture2D? OverlayIcon) GetIconForFileExtension(string fileExtension)
{
@@ -29,7 +29,7 @@ public partial class SolutionExplorerPanel
".html" or ".htm" => _htmlIcon,
".css" => _cssIcon,
".txt" => _txtIcon,
".props" => _genericFileIcon,
".props" or ".config" => _genericFileIcon,
".md" => _mdFileIcon,
".editorconfig" => _editorConfigFileIcon,
_ => _csIcon
@@ -37,6 +37,7 @@ public partial class SolutionExplorerPanel
var overlayTexture = fileExtension switch
{
".props" => _propsFileOverlayIcon,
".config" => _configFileOverlayIcon,
_ => null
};