Fix TextEdit clips children and focus style.#109078
Fix TextEdit clips children and focus style.#109078Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
kitbdev
left a comment
There was a problem hiding this comment.
I don't know much about the rendering server methods to add canvas items, but it seems to work fine.
Some minor issues:
CodeEdit::_draw_guidelines still uses theme_cache.style_normal.
TextEdit::set_editable should call update_minimum_size().
040823c to
24e19a4
Compare
8303df9 to
31485d3
Compare
31485d3 to
fe8b693
Compare
fe8b693 to
5f178e2
Compare
The half line spacing we add to offset the text should be removed or double checked if it's taken into account in all other calculations like |
c140ed7 to
f12a8bd
Compare
f12a8bd to
e1ff26a
Compare
|
Moved the styles fix to another PR #110527, will keep this PR fixing only the clipping issues. |
0af4e9d to
2e9f911
Compare
2e9f911 to
5257372
Compare
I think it will have to be considered there. I've been looking for some inconsistency with related calculations, so thanks for pointing that out. This can be done later though, the behavior in #110527 get_line_column_at_pos is good for now. It can be more easily seen with the cross cursor. |
kitbdev
left a comment
There was a problem hiding this comment.
Looks good.
- This also fixes #74445 since the expand margins now work by default .
- I don't think this fixes #42342 I think it is talking about how the text doesn't get clipped accurately when there is a content margin on a per pixel bases, though it is hard to tell.
Note that TextEdit's clip_contents default value changed, but this is needed to fix the issues.
5257372 to
9eb5b60
Compare
Co-Authored-By: kit <kitbdev@gmail.com>
9eb5b60 to
b25e35c
Compare
|
Thanks! |
This PR refactors TextEdit to stop clipping its children and now uses its own CanvasItem logic for drawing text.
Changes:
Note: This PR is not intended to change any existing behavior due to the complexity of the
TextEditclass. The only goal is to resolve the mentioned issues and improve internal drawing consistency.