Skip to content

Render big-text inside popup #1

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
jfrader opened this issue Jul 6, 2024 · 4 comments
Open

Render big-text inside popup #1

jfrader opened this issue Jul 6, 2024 · 4 comments

Comments

@jfrader
Copy link

jfrader commented Jul 6, 2024

Is it possible to render inside the popup SizedWrapper of your other library?

BTW I love your stuff!!

@joshka
Copy link
Owner

joshka commented Jul 7, 2024

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.

@jfrader
Copy link
Author

jfrader commented Jul 8, 2024

Thank you!
I wonder if putting it inside a block is also possible, I tried but didn't find a soluton

@jfrader
Copy link
Author

jfrader commented Jul 8, 2024

Actually I just did 😅

        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);

@joshka joshka transferred this issue from joshka/tui-big-text Jul 24, 2024
@joshka joshka changed the title Popup Render big-text inside popup Jul 24, 2024
@joshka
Copy link
Owner

joshka commented Jul 24, 2024

@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.

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