icon in problems panel
This commit is contained in:
@@ -13,6 +13,8 @@ public partial class ProblemsPanel : Control
|
||||
public Texture2D WarningIcon { get; set; } = null!;
|
||||
[Export]
|
||||
public Texture2D ErrorIcon { get; set; } = null!;
|
||||
[Export]
|
||||
public Texture2D CsprojIcon { get; set; } = null!;
|
||||
|
||||
public SharpIdeSolutionModel? Solution { get; set; }
|
||||
|
||||
@@ -59,6 +61,7 @@ public partial class ProblemsPanel : Control
|
||||
{
|
||||
var treeItem = tree.CreateItem(parent);
|
||||
treeItem.SetText(0, e.NewItem.Value.Name);
|
||||
treeItem.SetIcon(0, CsprojIcon);
|
||||
e.NewItem.View.Value = treeItem;
|
||||
|
||||
Observable.EveryValueChanged(e.NewItem.Value, s => s.Diagnostics.Count).Subscribe(s => treeItem.Visible = s is not 0).AddTo(this);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://tqpmww430cor"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://tqpmww430cor"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b1r3no4u3khik" path="res://Features/Problems/ProblemsPanel.cs" id="1_bnenc"]
|
||||
[ext_resource type="Texture2D" uid="uid://pd3h5qfjn8pb" path="res://Features/Problems/Resources/Warning.svg" id="2_xj8le"]
|
||||
[ext_resource type="Texture2D" uid="uid://rvuk8jybyu6m" path="res://Features/Problems/Resources/Error.svg" id="3_sap6e"]
|
||||
[ext_resource type="Texture2D" uid="uid://cqt30ma6xgder" path="res://Features/SolutionExplorer/Resources/Csproj.svg" id="4_wqdox"]
|
||||
|
||||
[node name="ProblemsPanel" type="Control"]
|
||||
layout_mode = 3
|
||||
@@ -14,6 +15,7 @@ grow_vertical = 2
|
||||
script = ExtResource("1_bnenc")
|
||||
WarningIcon = ExtResource("2_xj8le")
|
||||
ErrorIcon = ExtResource("3_sap6e")
|
||||
CsprojIcon = ExtResource("4_wqdox")
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="."]
|
||||
layout_mode = 1
|
||||
|
||||
Reference in New Issue
Block a user