Skip to content

Alignment in Cursive #626

Answered by gyscos
python128 asked this question in Q&A
Jan 5, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Hi, and thanks for the question!

Right now there are two ways to do it:

  • The manual way: use StackView::add_layer_at to manually put the new layer at the bottom of the screen, and use StackView::reposition_layer to keep it at the bottom when you detect a resize event.
  • The automatic way: write a custom view wrapper that requests the full width and height, but keep its child at the bottom.

https://docs.rs/cursive-aligned-view/latest/cursive_aligned_view/ may be an implementation of the second solution.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@python128
Comment options

@python128
Comment options

@gyscos
Comment options

Answer selected by python128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants