Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix button placement in
split_screen
example (bevyengine#14405)
# Objective Fixes the buttons in `split_screen` touching the edge of the viewport. ## Solution This seems like it might potentially be "normal css-like" behavior with absolutely positioned nodes and padding. <details> <summary>HTML test</summary> ```html <html> <body> <div style="width: 100%; height: 100%; padding: 20px;"> <div style="width: 100%; height: 100%; padding: 20px; display: flex; justify-content: space-between; align-items: center"> <div style="width: 40px; height: 40px; border: 1px solid black;"><</div> <div style="width: 40px; height: 40px; border: 1px solid black;">></div> </div> </div> </body> </html> ``` </details> Instead I just removed the padding from the root node. ## Testing Added ui debug gizmos to the example and checked before/after. Before: <img width="1280" alt="Screenshot 2024-07-20 at 9 23 09 AM" src="https://github.com/user-attachments/assets/f3cac637-8de9-4acf-bb13-994791998bb7"> After: <img width="1280" alt="Screenshot 2024-07-20 at 9 37 27 AM" src="https://github.com/user-attachments/assets/4d3c23b4-5a48-45da-b8a5-a394fd34a44b">
- Loading branch information