make sln entries buttons

This commit is contained in:
Matt Parker
2025-10-02 20:40:53 +10:00
parent f325b546b8
commit 929fb206e2
3 changed files with 43 additions and 15 deletions

View File

@@ -3,7 +3,7 @@ using SharpIDE.Godot.Features.IdeSettings;
namespace SharpIDE.Godot.Features.SlnPicker;
public partial class PreviousSlnEntry : HBoxContainer
public partial class PreviousSlnEntry : MarginContainer
{
private Label _slnPathLabel = null!;
private Label _slnNameLabel = null!;
@@ -16,7 +16,7 @@ public partial class PreviousSlnEntry : HBoxContainer
if (RecentSln is null) return;
_slnNameLabel = GetNode<Label>("%SlnNameLabel");
_slnPathLabel = GetNode<Label>("%SlnPathLabel");
_slnColourPanel = GetNode<Panel>("Panel");
_slnColourPanel = GetNode<Panel>("%Panel");
_slnNameLabel.Text = RecentSln.Name;
_slnPathLabel.Text = RecentSln.FilePath;
_slnColourPanel.Modulate = RandomRecentSlnColours.GetColourForFilePath(RecentSln.FilePath);

View File

@@ -14,33 +14,61 @@ corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 5
[node name="PreviousSlnEntry" type="HBoxContainer"]
offset_right = 40.0
offset_bottom = 40.0
theme_override_constants/separation = 10
[node name="PreviousSlnEntry" type="MarginContainer"]
anchors_preset = 14
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_top = -4.0
offset_bottom = 4.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 2
theme_override_constants/margin_top = 2
theme_override_constants/margin_right = 2
theme_override_constants/margin_bottom = 2
script = ExtResource("1_2ycpd")
[node name="Panel" type="Panel" parent="."]
[node name="Button" type="Button" parent="."]
custom_minimum_size = Vector2(0, 65)
layout_mode = 2
[node name="MarginContainer" type="MarginContainer" parent="Button"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 15
theme_override_constants/margin_right = 15
[node name="PreviousSlnEntry" type="HBoxContainer" parent="Button/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 10
[node name="Panel" type="Panel" parent="Button/MarginContainer/PreviousSlnEntry"]
unique_name_in_owner = true
custom_minimum_size = Vector2(25, 25)
layout_mode = 2
size_flags_vertical = 4
theme_override_styles/panel = SubResource("StyleBoxFlat_1rtjt")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
[node name="VBoxContainer" type="VBoxContainer" parent="Button/MarginContainer/PreviousSlnEntry"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
theme_override_constants/separation = 0
[node name="SlnNameLabel" type="Label" parent="VBoxContainer"]
[node name="SlnNameLabel" type="Label" parent="Button/MarginContainer/PreviousSlnEntry/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Solution Name"
text_overrun_behavior = 3
[node name="SlnPathLabel" type="Label" parent="VBoxContainer"]
[node name="SlnPathLabel" type="Label" parent="Button/MarginContainer/PreviousSlnEntry/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_colors/font_color = Color(0.5132329, 0.5132329, 0.5132329, 1)
text = "C:\\Users\\Matthew\\Documents\\Git\\BlazorCodeBreaker\\BlazorCodeBreaker.slnx"
[node name="Spacer" type="Control" parent="."]
layout_mode = 2
size_flags_horizontal = 3
text_overrun_behavior = 3

View File

@@ -61,7 +61,7 @@ layout_mode = 2
[node name="LineEdit" type="LineEdit" parent="VSplitContainer/Panel/MarginContainer2/VBoxContainer2/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
placeholder_text = "Search Projects"
placeholder_text = "Search recent projects"
[node name="OpenSlnButton" type="Button" parent="VSplitContainer/Panel/MarginContainer2/VBoxContainer2/HBoxContainer"]
unique_name_in_owner = true