8000 [BUG] ScrollView on LinearLayout with Dialog doesn't scroll properly · Issue #813 · gyscos/cursive · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[BUG] ScrollView on LinearLayout with Dialog doesn't scroll properly #813
Open
@1uigii

Description

@1uigii

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.

Screenshots
Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0