Improves the Atom alignment in TextEdit#8022
Conversation
|
Preview available at https://egui-pr-preview.github.io/pr/8022-TextEdit-Atoms-Alignment View snapshot changes at kitdiff |
Co-authored-by: Emil Ernerfeldt <[email protected]>
Co-authored-by: Emil Ernerfeldt <[email protected]>
|
This existing snapshot tests doesn't seem to cover this fix? |
|
Not sure. Might it be because the current snapshot test is based on the current commit, which uses left-alignment regardless of what The compiled demo definitely looks correct visually and I'm getting no error on my machine after refreshing the snapshots... Edit: indeed, there's something wrong. I've run all tests on my machine and got a |
lucasmerlin
left a comment
There was a problem hiding this comment.
I've updated the snapshots. Looks like ci doesn't run all tests if theres a failure, that's annoying.
Unfortunately it looks like this change causes the text edits to shrink a bit, I assume due to the additional spacing introduced due to the extra atom. I don't have a simple idea for this, but I've run into it before. Maybe we can add a flag to atoms whether it should be ignored for spacing?
|
Opened #8026 to address this, it should fix the spacing issue |
|
This seemingly fixes the issue of the main text not wrapping correctly and apparently doesn't affect clip_text, which still works in single line if no size is manually definied. |



TextEdit.horizontal_align()#7999This seems to work in most scenarios but there's 2 things I'm not fully sure about:
vertical_alignother thanAlign::TOPis used. There's possible workarounds, but this might work for the time being if vertical alignment support in atoms is planned for the near futureScreenshots:



