You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
I copied the termwiz widget layout from widget_nested.rs into my project. With that I have a containing widget with vertical child orientation containing two children, one with 100% text height and another with a fixed height of 1 and a valign of bottom. With that setup, the 100% text height widget gets the full height of the container and the 1 height widget draws on top of the final line of the 100% text height widget.
I added a test to check on the issue here: groves@ac6edf9. With that, I get this layout result:
You can see that widget id 17 gets a height of 100 but widget id 18 starts at y 99, 1 line into 17's space. I'd expect 17's height to be 99.
If I remove the set_valign, it works. I don't think the valign is necessary here, so that's a fine workaround for me. I don't think using a bottom valign should break this though, so I figured I'd report it.
I tried messing with the cassowary weights in update_widget_constraint, but I couldn't get this to balance out. I can dig into the layout constraints more, just figured I'd ask if there's an obvious fix I'm not seeing.
To Reproduce
Run groves@ac6edf9 or add this at line 85 in widgets_nested.rs:
let dims = args.surface.dimensions();
args.surface
.add_change(format!("🤷 main surface size is {:?}", dims));
That'll print the size in the text input widget and you can see that it's the whole height of the terminal, not the height minus one.
Configuration
no config
Expected Behavior
Height of the 100% height widget to be 1 less than the container height.
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
A quick look suggests that the solver is not taking into account fixed height children and that it's creating overlap even if the more flexible widget didn't get the entire height.
Adding a constraint so that the child top is below the current top edge seems to do the trick for me.
What Operating System(s) are you seeing this problem on?
Linux Wayland
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
a0afe9c
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
I copied the termwiz widget layout from widget_nested.rs into my project. With that I have a containing widget with vertical child orientation containing two children, one with 100% text height and another with a fixed height of 1 and a valign of bottom. With that setup, the 100% text height widget gets the full height of the container and the 1 height widget draws on top of the final line of the 100% text height widget.
I added a test to check on the issue here: groves@ac6edf9. With that, I get this layout result:
You can see that widget id 17 gets a height of 100 but widget id 18 starts at y 99, 1 line into 17's space. I'd expect 17's height to be 99.
If I remove the set_valign, it works. I don't think the valign is necessary here, so that's a fine workaround for me. I don't think using a bottom valign should break this though, so I figured I'd report it.
I tried messing with the cassowary weights in update_widget_constraint, but I couldn't get this to balance out. I can dig into the layout constraints more, just figured I'd ask if there's an obvious fix I'm not seeing.
To Reproduce
Run groves@ac6edf9 or add this at line 85 in widgets_nested.rs:
That'll print the size in the text input widget and you can see that it's the whole height of the terminal, not the height minus one.
Configuration
no config
Expected Behavior
Height of the 100% height widget to be 1 less than the container height.
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: