Open
Description
Describe the bug
The ScrollView doesn't follow the Dialog boxes properly. This is especially noticeable when adding a button to the Dialog boxes. The last boxes (usually the last 33%) can't even be scrolled to.
To Reproduce
use cursive::{
view::{Resizable, Scrollable},
views,
};
fn main() {
let mut root = cursive::crossterm();
let mut list = views::LinearLayout::vertical();
for i in 1..=50 {
list.add_child(views::Dialog::text(format!("Some dialog ({i:>02})")))
}
let list = list.scrollable().fixed_size((70, 50));
root.add_layer(list);
root.run();
}
Expected behavior
Every Dialog box should be visible when scrolling.
Environment
- Windows 11
- Backend used: crossterm
- LANG=
- LC_CTYPE="C.UTF-8"
- LC_NUMERIC="C.UTF-8"
- LC_TIME="C.UTF-8"
- LC_COLLATE="C.UTF-8"
- LC_MONETARY="C.UTF-8"
- LC_MESSAGES="C.UTF-8"
- LC_ALL=
- Cursive version 0.21.1 (also tested with the latest master)
Additional context
It does not seem to be a problem with uniquely sized Views, but with Dialogs in particular, as it works with Panel, or LinearLayout (instead of Dialog) without problem.