Constraining size based on other views
This is maybe a feature request, but more of just a question about using the library:
I have a fixed sized view here on the right, and a full with `.full_width()` on the left:
<img width="1920" height="1200" alt="Image" src="https://github.com/user-attachments/assets/e826bd61-a732-408e-a926-f433cb27fc01" />
It works great. I can resize the window and the small column never gets wider, while the resizes to fit the screen.
...until something wider than the TextView gets appended
<img width="1920" height="1200" alt="Image" src="https://github.com/user-attachments/assets/16fc27b2-f206-4a6e-9109-34ea99800e7e" />
Then it grows until it takes the entire width of the screen before wrapping.
I can't figure out how I'm supposed to constrain it's size properly. `AtMost` and `Fixed` both require an actual value, which I haven't figured out a way to dynamically find. I tried adding a callback to `Event::Refresh` or `Event::WindowResize` than uses `siv.screen_size().x` and change the `max_width` of that view, but everything I've tried either results in the callbacks never running, or getting a screen width of 0.
I just want it to take up the entire screen minus the width of any fixed size views.
3 条评论