From 5179802f4856a2fe7215b7433538c508e05b7b95 Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:30:22 +1000 Subject: [PATCH] sln icon --- .../SolutionExplorer/Resources/SlnIcon.svg | 76 +++++++++++++++++++ .../Resources/SlnIcon.svg.import | 37 +++++++++ .../SolutionExplorer/SolutionExplorerPanel.cs | 3 + .../SolutionExplorerPanel.tscn | 4 +- 4 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 src/SharpIDE.Godot/Features/SolutionExplorer/Resources/SlnIcon.svg create mode 100644 src/SharpIDE.Godot/Features/SolutionExplorer/Resources/SlnIcon.svg.import diff --git a/src/SharpIDE.Godot/Features/SolutionExplorer/Resources/SlnIcon.svg b/src/SharpIDE.Godot/Features/SolutionExplorer/Resources/SlnIcon.svg new file mode 100644 index 0000000..8ef460b --- /dev/null +++ b/src/SharpIDE.Godot/Features/SolutionExplorer/Resources/SlnIcon.svg @@ -0,0 +1,76 @@ + + diff --git a/src/SharpIDE.Godot/Features/SolutionExplorer/Resources/SlnIcon.svg.import b/src/SharpIDE.Godot/Features/SolutionExplorer/Resources/SlnIcon.svg.import new file mode 100644 index 0000000..9b984aa --- /dev/null +++ b/src/SharpIDE.Godot/Features/SolutionExplorer/Resources/SlnIcon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://btlxqx3c08fjj" +path="res://.godot/imported/SlnIcon.svg-28ea2e2bd38af71b7008abec1f750ac9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Features/SolutionExplorer/Resources/SlnIcon.svg" +dest_files=["res://.godot/imported/SlnIcon.svg-28ea2e2bd38af71b7008abec1f750ac9.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/src/SharpIDE.Godot/Features/SolutionExplorer/SolutionExplorerPanel.cs b/src/SharpIDE.Godot/Features/SolutionExplorer/SolutionExplorerPanel.cs index 29bea52..967cd95 100644 --- a/src/SharpIDE.Godot/Features/SolutionExplorer/SolutionExplorerPanel.cs +++ b/src/SharpIDE.Godot/Features/SolutionExplorer/SolutionExplorerPanel.cs @@ -18,6 +18,8 @@ public partial class SolutionExplorerPanel : Panel public Texture2D SlnFolderIcon { get; set; } = null!; [Export] public Texture2D CsprojIcon { get; set; } = null!; + [Export] + public Texture2D SlnIcon { get; set; } = null!; public SharpIdeSolutionModel SolutionModel { get; set; } = null!; private Tree _tree = null!; @@ -44,6 +46,7 @@ public partial class SolutionExplorerPanel : Panel var rootItem = _tree.CreateItem(); rootItem.SetText(0, SolutionModel.Name); + rootItem.SetIcon(0, SlnIcon); // Add projects directly under solution foreach (var project in SolutionModel.Projects) diff --git a/src/SharpIDE.Godot/Features/SolutionExplorer/SolutionExplorerPanel.tscn b/src/SharpIDE.Godot/Features/SolutionExplorer/SolutionExplorerPanel.tscn index 5b01292..65a9475 100644 --- a/src/SharpIDE.Godot/Features/SolutionExplorer/SolutionExplorerPanel.tscn +++ b/src/SharpIDE.Godot/Features/SolutionExplorer/SolutionExplorerPanel.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=6 format=3 uid="uid://cy1bb32g7j7dr"] +[gd_scene load_steps=7 format=3 uid="uid://cy1bb32g7j7dr"] [ext_resource type="Script" uid="uid://bai53k7ongbxw" path="res://Features/SolutionExplorer/SolutionExplorerPanel.cs" id="1_gjy0r"] [ext_resource type="Texture2D" uid="uid://do0edciarrnp0" path="res://Features/SolutionExplorer/Resources/CsharpFile.svg" id="2_8ymw0"] [ext_resource type="Texture2D" uid="uid://xc8srvqwlwng" path="res://Features/SolutionExplorer/Resources/FolderIcon.svg" id="3_r1qfc"] [ext_resource type="Texture2D" uid="uid://bbfxltr1fcomt" path="res://Features/SolutionExplorer/Resources/SlnFolderIcon.svg" id="4_8ymw0"] [ext_resource type="Texture2D" uid="uid://cqt30ma6xgder" path="res://Features/SolutionExplorer/Resources/Csproj.svg" id="5_r1qfc"] +[ext_resource type="Texture2D" uid="uid://btlxqx3c08fjj" path="res://Features/SolutionExplorer/Resources/SlnIcon.svg" id="6_idvpu"] [node name="SolutionExplorerPanel" type="Panel"] anchors_preset = 15 @@ -17,6 +18,7 @@ CsharpFileIcon = ExtResource("2_8ymw0") FolderIcon = ExtResource("3_r1qfc") SlnFolderIcon = ExtResource("4_8ymw0") CsprojIcon = ExtResource("5_r1qfc") +SlnIcon = ExtResource("6_idvpu") [node name="Tree" type="Tree" parent="."] layout_mode = 1