add namespace icon

This commit is contained in:
Matt Parker
2025-10-27 21:45:22 +10:00
parent 88ad3f69d7
commit 77160b6002
3 changed files with 95 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ public partial class SharpIdeCodeEdit
private readonly Texture2D _fieldIcon = ResourceLoader.Load<Texture2D>("uid://c4y7d5m4upfju");
private readonly Texture2D _propertyIcon = ResourceLoader.Load<Texture2D>("uid://y5pwrwwrjqmc");
private readonly Texture2D _keywordIcon = ResourceLoader.Load<Texture2D>("uid://b0ujhoq2xg2v0");
// namespace
private readonly Texture2D _namespaceIcon = ResourceLoader.Load<Texture2D>("uid://bob5blfjll4h3");
private Texture2D? GetIconForCompletion(SymbolKind? symbolKind, TypeKind? typeKind, Accessibility? accessibility, bool isKeyword)
{
@@ -25,6 +25,7 @@ public partial class SharpIdeCodeEdit
(SymbolKind.Local, _, _) => _localVariableIcon,
(SymbolKind.Field, _, _) => _fieldIcon,
(SymbolKind.Property, _, _) => _propertyIcon,
(SymbolKind.Namespace, _, _) => _namespaceIcon,
_ => null
};
return texture;

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg
height="800px"
width="800px"
version="1.1"
id="Capa_1"
viewBox="0 0 525.325 525.325"
xml:space="preserve"
sodipodi:docname="namespace-icon.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"><rect
x="160.93193"
y="352.88689"
width="989.26245"
height="823.56879"
id="rect1" /></defs><sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:zoom="0.72937499"
inkscape:cx="75.407028"
inkscape:cy="409.25451"
inkscape:window-width="2560"
inkscape:window-height="1369"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g1" />
<g
id="g1"
transform="matrix(1.0007541,0,0,0.96334492,-0.19807395,9.6729914)">
<path
d="m 524.20526,1089.6802 h -48.82815 q -58.26826,0 -94.72661,-32.5521 -36.13283,-32.2266 -36.13283,-93.42452 v -48.50263 q 0,-55.01304 -27.01825,-85.93754 -27.01824,-31.25001 -82.68233,-31.25001 h -16.60157 v -50.78128 h 16.60157 q 55.66409,0 82.68233,-30.92449 27.01825,-31.25002 27.01825,-86.26307 v -48.50262 q 0,-61.19795 36.13283,-93.42453 36.45835,-32.5521 94.72661,-32.5521 h 48.82815 v 44.9219 h -37.1094 q -44.27085,0 -64.45315,20.50782 -19.85679,20.50782 -19.85679,66.08076 v 56.96618 q 0,45.24742 -25.06511,76.17191 -25.06512,30.59897 -69.66149,48.50263 v 7.8125 q 44.59637,17.90366 69.66149,48.82815 25.06511,30.59897 25.06511,75.84639 v 56.96617 q 0,45.57298 19.85679,66.08078 20.1823,20.5078 64.45315,20.5078 h 37.1094 z M 951.93983,798.0134 h -16.60158 q -55.66408,0 -82.68233,31.25001 -27.01824,30.9245 -27.01824,85.93754 v 48.50263 q 0,61.19792 -36.45835,93.42452 -36.13283,32.5521 -94.40109,32.5521 h -48.82815 v -44.9219 h 37.1094 q 44.27085,0 64.12763,-20.5078 20.1823,-20.5078 20.1823,-66.08078 v -56.96617 q 0,-45.24742 25.06512,-75.84639 25.06512,-30.92449 69.66149,-48.82815 v -7.8125 q -44.59637,-17.90366 -69.66149,-48.50263 -25.06512,-30.92449 -25.06512,-76.17191 v -56.96618 q 0,-45.57294 -20.1823,-66.08076 -19.85678,-20.50782 -64.12763,-20.50782 h -37.1094 v -44.9219 h 48.82815 q 58.26826,0 94.40109,32.5521 36.45835,32.22658 36.45835,93.42453 v 48.50262 q 0,55.01305 27.01824,86.26307 27.01825,30.92449 82.68233,30.92449 h 16.60158 z"
id="text1"
style="font-size:666.667px;white-space:pre;shape-padding:0.969469;fill:#cbcdd4;stroke-width:5;stroke-linecap:round;stroke-linejoin:round"
transform="matrix(0.65616144,0,0,0.68164189,-121.24291,-264.03633)"
aria-label="{}" /></g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bob5blfjll4h3"
path="res://.godot/imported/namespace-icon.svg-481c22182a69b397b38cfcc847d1060b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Features/Completions/Resources/namespace-icon.svg"
dest_files=["res://.godot/imported/namespace-icon.svg-481c22182a69b397b38cfcc847d1060b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=0.1
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false