Fix TextEdit styles and disable clipping.

Co-Authored-By: kit <kitbdev@gmail.com>
This commit is contained in:
Mounir Tohami 2025-08-20 13:06:27 +03:00
parent 149a4b4ca1
commit b25e35cf58
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"]));
}
}