From 9252f5674629c0a9e8ccaef3b3e16a2f55bb55f4 Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Fri, 30 Jan 2026 22:22:42 +1000 Subject: [PATCH] refactor PopupPanel stylebox to theme --- .../Search/SearchAllFiles/SearchAllFilesWindow.tscn | 10 ---------- .../Features/Search/SearchInFiles/SearchWindow.tscn | 10 ---------- src/SharpIDE.Godot/Resources/DarkTheme.tres | 10 ++++++++++ 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/SharpIDE.Godot/Features/Search/SearchAllFiles/SearchAllFilesWindow.tscn b/src/SharpIDE.Godot/Features/Search/SearchAllFiles/SearchAllFilesWindow.tscn index d8f3eee..ab7e413 100644 --- a/src/SharpIDE.Godot/Features/Search/SearchAllFiles/SearchAllFilesWindow.tscn +++ b/src/SharpIDE.Godot/Features/Search/SearchAllFiles/SearchAllFilesWindow.tscn @@ -3,21 +3,11 @@ [ext_resource type="Script" uid="uid://dbbjoiur46dhq" path="res://Features/Search/SearchAllFiles/SearchAllFilesWindow.cs" id="1_opko0"] [ext_resource type="PackedScene" uid="uid://cactda5eiy55" path="res://Features/Search/SearchAllFiles/SearchAllFilesResultComponent.tscn" id="2_opko0"] -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cuaw5"] -bg_color = Color(0.1764706, 0.1764706, 0.1764706, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 -shadow_color = Color(0, 0, 0, 0.11764706) -shadow_size = 4 - [node name="SearchAllFilesWindow" type="PopupPanel" unique_id=1205606557] oversampling_override = 1.0 initial_position = 5 size = Vector2i(1200, 800) visible = true -theme_override_styles/panel = SubResource("StyleBoxFlat_cuaw5") script = ExtResource("1_opko0") [node name="MarginContainer" type="MarginContainer" parent="." unique_id=1910601782] diff --git a/src/SharpIDE.Godot/Features/Search/SearchInFiles/SearchWindow.tscn b/src/SharpIDE.Godot/Features/Search/SearchInFiles/SearchWindow.tscn index ee471d0..e38573b 100644 --- a/src/SharpIDE.Godot/Features/Search/SearchInFiles/SearchWindow.tscn +++ b/src/SharpIDE.Godot/Features/Search/SearchInFiles/SearchWindow.tscn @@ -3,21 +3,11 @@ [ext_resource type="Script" uid="uid://bah6tmifl41ce" path="res://Features/Search/SearchInFiles/SearchWindow.cs" id="1_ft33p"] [ext_resource type="PackedScene" uid="uid://d358tex0duum8" path="res://Features/Search/SearchInFiles/SearchResultComponent.tscn" id="2_cuaw5"] -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cuaw5"] -bg_color = Color(0.1764706, 0.1764706, 0.1764706, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 -shadow_color = Color(0, 0, 0, 0.11764706) -shadow_size = 4 - [node name="SearchWindow" type="PopupPanel" unique_id=1478372446] oversampling_override = 1.0 initial_position = 5 size = Vector2i(1200, 800) visible = true -theme_override_styles/panel = SubResource("StyleBoxFlat_cuaw5") script = ExtResource("1_ft33p") [node name="MarginContainer" type="MarginContainer" parent="." unique_id=739901057] diff --git a/src/SharpIDE.Godot/Resources/DarkTheme.tres b/src/SharpIDE.Godot/Resources/DarkTheme.tres index 262c0ee..c08b42c 100644 --- a/src/SharpIDE.Godot/Resources/DarkTheme.tres +++ b/src/SharpIDE.Godot/Resources/DarkTheme.tres @@ -24,6 +24,15 @@ corner_radius_bottom_right = 3 corner_radius_bottom_left = 3 corner_detail = 5 +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_amw38"] +bg_color = Color(0.1764706, 0.1764706, 0.1764706, 1) +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 +shadow_color = Color(0, 0, 0, 0.11764706) +shadow_size = 4 + [resource] CodeEdit/colors/current_line_color = Color(0.05882353, 0.05882353, 0.05882353, 1) Gray500Label/base_type = &"Label" @@ -34,4 +43,5 @@ Gray700Label/base_type = &"Label" Gray700Label/colors/font_color = Color(0.83137256, 0.83137256, 0.83137256, 1) Panel/styles/panel = SubResource("StyleBoxFlat_3gh6f") PanelContainer/styles/panel = SubResource("StyleBoxFlat_6e8is") +PopupPanel/styles/panel = SubResource("StyleBoxFlat_amw38") Tree/colors/font_color = Color(0.83137256, 0.83137256, 0.83137256, 1)