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
Padding for LinearLayout #117
Comments
Dummy views are there for this purpose. Though I can understand it'd start to be annoying having to add one every time if you have a very long LinearView... I'll look into that. Maybe it could also have optional borders... |
TL;DR: How do I build a transparent I'm trying to visualize the keymap in my editor built on Cursive (using the new text styles - great work!). Currently I position the keymap view below the editor using a LinearLayout::vertical()
.child(view.with_id("inner") .full_screen()) // main editor
.child(Line::horizontal() .full_width()) // delimiter
.child(ListView::new().with_id("keymap").full_width()) // keymap
.full_width()
.with_id("overlay") Resulting in (list is empty): However, since the cursor is always scrolled into view, the text scrolls when I fill the keymap view and the view size changes: I would like the keymap to behave like an overlay though, with no influence on the content behind it. The delimiter should also only be shown when the overlay is shown. So I wrapped everything in a StackView::new()
.fullscreen_layer(view.with_id("inner").full_screen()) // main editor
.fullscreen_layer(LinearLayout::vertical()
.child(cursive::views::DummyView .full_screen()) // spacer
.child(Line::horizontal() .full_width()) // delimiter
.child(ListView::new().with_id("keymap").full_width()) // keymap
.full_width()
.with_id("overlay")
) However, even though Do you have any tips on how I could achieve that layout? |
Hi!
I'll run some tests, but it's possible we don't need that anymore. We can fill the background in Note that |
Hello,
I would like to add a row between a PogressBar and a Button which are in a LinearLayout.
I couldn't find a way to separate the two Views from each other. I would prefer to set a value like in a Dialog with padding.
Can you add one or do I need to add a DummyView between the two to achieve my goal?
The text was updated successfully, but these errors were encountered: