add txt icon

This commit is contained in:
Matt Parker
2025-11-28 23:58:57 +10:00
parent 704f2e17ca
commit a62e1710cf
3 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
class="mud-icon-root mud-svg-icon mud-error-text mud-icon-size-medium"
focusable="false"
viewBox="0 0 24 24"
aria-hidden="true"
role="img"
style="fill: rgb(40, 167, 69);"
version="1.1"
id="svg1"
sodipodi:docname="TxtFile.svg"
inkscape:version="1.4.2 (f4327f4, 2025-05-13)"
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="34.383067"
inkscape:cx="13.524099"
inkscape:cy="15.778115"
inkscape:window-width="2560"
inkscape:window-height="1369"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<path
style="fill:#dfdfdf;fill-opacity:1;stroke:#dfdfdf;stroke-width:1.3;stroke-linecap:square;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="M 3.3982194,6.021161 H 20.60178"
id="path1" />
<path
style="fill:#dfdfdf;fill-opacity:1;stroke:#dfdfdf;stroke-width:1.3;stroke-linecap:square;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="M 3.3982201,10.007054 H 14.955588"
id="path1-5"
sodipodi:nodetypes="cc" />
<path
style="fill:#dfdfdf;fill-opacity:1;stroke:#dfdfdf;stroke-width:1.3;stroke-linecap:square;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="M 3.3982199,17.978839 H 14.955588"
id="path1-5-1"
sodipodi:nodetypes="cc" />
<path
style="fill:#dfdfdf;fill-opacity:1;stroke:#dfdfdf;stroke-width:1.3;stroke-linecap:square;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="M 3.3982199,13.992946 H 20.60178"
id="path1-8" />
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

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

View File

@@ -9,6 +9,7 @@ public partial class SolutionExplorerPanel
private readonly Texture2D _razorIcon = ResourceLoader.Load<Texture2D>("uid://cff7jlvj2tlg2");
private readonly Texture2D _jsonIcon = ResourceLoader.Load<Texture2D>("uid://csrwpjk77r731");
private readonly Texture2D _jsIcon = ResourceLoader.Load<Texture2D>("uid://cpdobpjrm2suc");
private readonly Texture2D _txtIcon = ResourceLoader.Load<Texture2D>("uid://b6bpjhs2o1j2l");
private Texture2D GetIconForFileExtension(string fileExtension)
{
@@ -18,6 +19,7 @@ public partial class SolutionExplorerPanel
".razor" or ".cshtml" => _razorIcon,
".json" => _jsonIcon,
".js" => _jsIcon,
".txt" => _txtIcon,
_ => _csIcon
};
return texture;