Merge pull request #109078 from WhalesState/text-edit-clipping

Fix TextEdit clips children and focus style.
This commit is contained in:
Thaddeus Crews 2025-09-24 09:59:12 -05:00
commit 5db618a2db
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
5 changed files with 119 additions and 64 deletions

View file

@ -523,9 +523,10 @@ void ScriptTextEditor::_inline_object_draw(const Dictionary &p_info, const Rect2
if (color_alpha_texture.is_null()) {
color_alpha_texture = inline_color_picker->get_theme_icon("sample_bg", "ColorPicker");
}
code_editor->get_text_editor()->draw_texture_rect(color_alpha_texture, col_rect, false);
code_editor->get_text_editor()->draw_rect(col_rect, Color(p_info["color"]));
code_editor->get_text_editor()->draw_rect(col_rect, Color(1, 1, 1), false, 1);
RID text_ci = code_editor->get_text_editor()->get_text_canvas_item();
RS::get_singleton()->canvas_item_add_rect(text_ci, p_rect.grow(-3), Color(1, 1, 1));
color_alpha_texture->draw_rect(text_ci, col_rect);
RS::get_singleton()->canvas_item_add_rect(text_ci, col_rect, Color(p_info["color"]));
}
}