egui
egui copied to clipboard
WIP: get rid of clip_rect_margin
clip_rect_margin is an ugly hack that I rather not have.
This PR sets it to zero.
The margins of a window is now added to the inside of any ScrollArea in that window.
Why is there a clip_rect_margin?
Consider the problem of putting something with a frame (e.g. a button) inside a scroll area.
The button will be places so that the middle of its outer stroke is right on the edge of the scroll area. This means only half of the stroke width will be visible. Buttons also grow when hovered, exacerbating the problem.
There are three potential solutions:
- The existing
clip_rect_margin, allowing widgets to "color outside the lines" - Add an inner margin to the inside of scroll areas (but this means things outside the scroll area are not aligned with things inside of it)
- Fix https://github.com/emilk/egui/issues/4019
@varphone you may wanna test this to see I didn't break your custom window frames