Skip to content

Scrolling ProgressBars #949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kenodegard opened this issue Aug 2, 2019 · 1 comment
Open

Scrolling ProgressBars #949

kenodegard opened this issue Aug 2, 2019 · 1 comment

Comments

@kenodegard
Copy link
Contributor

Is it possible to make the progress bars into a scrollable container?

While I could (and should) remove progress bars as they complete that doesn't address the issue of say having a window that is N lines long but having N+M bars and hence all of the M bars at the bottom of the container becoming inaccessible.

I have looked over the implementation of progress bars and read the documentation and I do not see a quick fix given that Containers themselves are not scrollable.

Any ideas?

@jonathanslenders
Copy link
Member

Hi @njalerikson,

Containers are indeed not scrollable. Technically, we can make a ScrollableContainer, although I'm not sure how that would impact the rendering performance. We would have to paint the content of the ScrollableContainer to a much larger virtual screen, and then copy over the visible region.

I think however it should be possible to use the Window that wraps the _ProgressControl and take advantage of its scrolling capabilities. Window has a vertical_scroll attribute. One thing we have to keep in mind though is that a Window will try to keep the cursor position visible, but _ProgressControl does not report a cursor position, which means that it'll always be (0,0). Because of this Window will always adapt its vertical_scroll during the rendering to make the cursor visible. So, there we have two options. Either we give Window an option to ignore the cursor position, or we adapt _ProgressControl so that it does report a cursor position, and we use that for scrolling. I think the first will give the best user experience.

I take this as a feature request. Feel free to play around with the code and create a PR. When I have some time, I'll look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants