tui-widgets
tui-widgets copied to clipboard
Render big-text inside popup
Is it possible to render inside the popup SizedWrapper of your other library?
BTW I love your stuff!!
In theory you should be able to, but in practice I think this fits in a weird area whether the WidgetRef stuff causes some pain. BigText doesn't implement widget ref, and the popup only deals in that right now. Let me play with it a bit and get back to you.
Thank you! I wonder if putting it inside a block is also possible, I tried but didn't find a soluton
Actually I just did :sweat_smile:
let second_pane_layout = Layout::default()
.direction(Direction::Horizontal)
.constraints(vec![Constraint::Percentage(50), Constraint::Percentage(50)])
.split(main_layout[1]);
let big_text = BigText::builder()
.lines(vec![ ... ])
.build()
.unwrap();
let price_block = Block::bordered();
let price_block_area = price_block.inner(second_pane_layout[1]);
frame.render_widget(price_block, second_pane_layout[1]);
frame.render_widget(big_text, price_block_area);
@jfrader I'm consolidating several repos (popup, prompt, scrollview, etc.) into this one to make it simpler to maintain and do things like this that involve cross crate changes.