From 62bef02de8e042e9d538bd64a2b7cd3a30027d8a Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Thu, 25 Sep 2025 00:21:35 +1000 Subject: [PATCH] search result select style --- .../Search/SearchResultComponent.tscn | 44 ++++++++++++++++--- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/src/SharpIDE.Godot/Features/Search/SearchResultComponent.tscn b/src/SharpIDE.Godot/Features/Search/SearchResultComponent.tscn index 4429b77..169fda2 100644 --- a/src/SharpIDE.Godot/Features/Search/SearchResultComponent.tscn +++ b/src/SharpIDE.Godot/Features/Search/SearchResultComponent.tscn @@ -1,30 +1,60 @@ -[gd_scene load_steps=2 format=3 uid="uid://d358tex0duum8"] +[gd_scene load_steps=4 format=3 uid="uid://d358tex0duum8"] [ext_resource type="Script" uid="uid://6sdu34jtdrux" path="res://Features/Search/SearchResultComponent.cs" id="1_6ov2c"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6ov2c"] +draw_center = false + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dtmd4"] +bg_color = Color(0.18039216, 0.2627451, 0.43137255, 1) +corner_radius_top_left = 3 +corner_radius_top_right = 3 +corner_radius_bottom_right = 3 +corner_radius_bottom_left = 3 + [node name="SearchResultComponent" type="MarginContainer"] -anchors_preset = 10 +anchors_preset = 14 +anchor_top = 0.5 anchor_right = 1.0 -offset_bottom = 23.0 +anchor_bottom = 0.5 +offset_top = -4.0 +offset_bottom = 4.0 grow_horizontal = 2 +grow_vertical = 2 script = ExtResource("1_6ov2c") -[node name="HBoxContainer" type="HBoxContainer" parent="."] +[node name="Button" type="Button" parent="."] +custom_minimum_size = Vector2(0, 26) +layout_mode = 2 +theme_override_styles/normal = SubResource("StyleBoxFlat_6ov2c") +theme_override_styles/focus = SubResource("StyleBoxFlat_dtmd4") + +[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 = 5 +theme_override_constants/margin_right = 5 + +[node name="HBoxContainer" type="HBoxContainer" parent="Button/MarginContainer"] layout_mode = 2 -[node name="MatchingLineLabel" type="Label" parent="HBoxContainer"] +[node name="MatchingLineLabel" type="Label" parent="Button/MarginContainer/HBoxContainer"] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 text = "Line matching search result" text_overrun_behavior = 3 -[node name="FileNameLabel" type="Label" parent="HBoxContainer"] +[node name="FileNameLabel" type="Label" parent="Button/MarginContainer/HBoxContainer"] unique_name_in_owner = true layout_mode = 2 text = "FileName.cs" -[node name="LineNumberLabel" type="Label" parent="HBoxContainer"] +[node name="LineNumberLabel" type="Label" parent="Button/MarginContainer/HBoxContainer"] unique_name_in_owner = true layout_mode = 2 text = "24"