From 71ee53384e3102e31a4d7c538639a934013ad51f Mon Sep 17 00:00:00 2001 From: passivestar <60579014+passivestar@users.noreply.github.com> Date: Sun, 28 Dec 2025 18:47:18 +0400 Subject: [PATCH] Fix background color of EditorInspectorArray --- editor/inspector/editor_inspector.cpp | 8 ++++---- editor/themes/theme_classic.cpp | 3 +++ editor/themes/theme_modern.cpp | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/editor/inspector/editor_inspector.cpp b/editor/inspector/editor_inspector.cpp index d1bf72d40f..a12a5ced5e 100644 --- a/editor/inspector/editor_inspector.cpp +++ b/editor/inspector/editor_inspector.cpp @@ -2664,7 +2664,7 @@ void EditorInspectorArray::_panel_draw(int p_index) { if (style.is_null()) { return; } - if (array_elements[p_index].panel->has_focus()) { + if (array_elements[p_index].panel->has_focus(true)) { array_elements[p_index].panel->draw_style_box(style, Rect2(Vector2(), array_elements[p_index].panel->get_size())); } } @@ -3280,9 +3280,9 @@ void EditorInspectorArray::_notification(int p_what) { } break; case NOTIFICATION_THEME_CHANGED: { - Color color = get_theme_color(SNAME("dark_color_1"), EditorStringName(Editor)); - odd_style->set_bg_color(color.darkened(-0.08)); - even_style->set_bg_color(color.darkened(0.08)); + Color color = get_theme_color(SNAME("bg"), SNAME("EditorInspectorArray")); + odd_style->set_bg_color(color.darkened(-0.1)); + even_style->set_bg_color(color.darkened(0.1)); for (ArrayElement &ae : array_elements) { if (ae.move_texture_rect) { diff --git a/editor/themes/theme_classic.cpp b/editor/themes/theme_classic.cpp index 7301d43c8a..07093d1db1 100644 --- a/editor/themes/theme_classic.cpp +++ b/editor/themes/theme_classic.cpp @@ -2127,6 +2127,9 @@ void ThemeClassic::populate_editor_styles(const Ref &p_theme, Edito category_bg->set_content_margin_all(0); p_theme->set_stylebox("bg", "EditorInspectorCategory", category_bg); + // EditorInspectorArray. + p_theme->set_color("bg", "EditorInspectorArray", p_config.dark_color_1); + p_theme->set_constant("inspector_margin", EditorStringName(Editor), 12 * EDSCALE); // Colored EditorProperty. diff --git a/editor/themes/theme_modern.cpp b/editor/themes/theme_modern.cpp index e4c61de8cf..b49981f693 100644 --- a/editor/themes/theme_modern.cpp +++ b/editor/themes/theme_modern.cpp @@ -2157,6 +2157,9 @@ void ThemeModern::populate_editor_styles(const Ref &p_theme, Editor } p_theme->set_stylebox("bg", "EditorInspectorCategory", category_bg); + // EditorInspectorArray. + p_theme->set_color("bg", "EditorInspectorArray", p_config.surface_base_color); + p_theme->set_constant("inspector_margin", EditorStringName(Editor), 12 * EDSCALE); // Colored EditorProperty.