Skip to content

Conversation

@kitbdev
Copy link
Contributor

@kitbdev kitbdev commented Dec 19, 2025

This makes TextEdit (and CodeEdit) use floats for left and right content margins.
This doesn't affect the top and bottom ones since there isn't an issue with them currently and other controls that draw text seem to snap text to integers anyway.
Changes get_line_column_at_pos to accept Vector2 instead of Vector2i since it is used with the mouse position which is a Vector2.
The h_scroll functions now uses double to pass to the scrollbar, like the v_scroll ones.
Also changed some of the minimap horizontal mouse checks to be consistent so the hover and click detection matches the cursor.

Note that TextEdit still has lots of issues in rtl layout mode, but the specific case in #105827 where the stylebox left and right margins were equal and ended with .5 or greater is fine.
This is easier to test with #114217

@kitbdev
Copy link
Contributor Author

kitbdev commented Dec 20, 2025

Added compatibility methods so this shouldn't break compat.
This probably can't be cherry-picked, so if we want a fix for 4.5 then I can make a separate PR that just adjusts the style->get_minimum_size() to ceil both sides individually.

@kitbdev kitbdev marked this pull request as ready for review December 20, 2025 02:19
@kitbdev kitbdev requested review from a team as code owners December 20, 2025 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Long lines in the script editor cut off the final character Script editor stops scrolling one column early

2 participants