You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 19:41:11 +00:00
Merge pull request #114394 from passivestar/editor-inspector-array-bg
Fix background color of EditorInspectorArray
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -2134,6 +2134,9 @@ void ThemeClassic::populate_editor_styles(const Ref<EditorTheme> &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.
|
||||
|
||||
@@ -2201,6 +2201,9 @@ void ThemeModern::populate_editor_styles(const Ref<EditorTheme> &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.
|
||||
|
||||
Reference in New Issue
Block a user