Skip to content
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

Weird rendering on narrow windows with 'compact' layout #318

Open
osa1 opened this issue May 3, 2021 · 0 comments
Open

Weird rendering on narrow windows with 'compact' layout #318

osa1 opened this issue May 3, 2021 · 0 comments
Labels
bug libtiny_tui Issues/PRs related to the TUI library
Milestone

Comments

@osa1
Copy link
Owner

osa1 commented May 3, 2021

Screenshot_2021-05-03_10-26-26

To repro:

  • Enable layout: aligned in crates/tiny/config.toml so that the "chat" example in TUI will use the aligned layout.
  • Run cargo run --example chat in crates/libtiny_tui
  • Navigate to the channel tab and make the window narrow.

It renders fine for a while, but then renders weirdly as shown in the screenshot.

I think it might make sense to fall back to the compact layout when there isn't enough columns on the terminal, which renders nicely even on small terminals.

Pinging @trevarj who implemented compact layout.

@osa1 osa1 added bug libtiny_tui Issues/PRs related to the TUI library labels May 3, 2021
@osa1 osa1 added this to the v0.9 milestone May 3, 2021
trevarj added a commit to trevarj/tiny that referenced this issue May 8, 2021
Instead of applying padding to the actual data in the line buffers, this
applies the correct padding on the fly during line height calculation
and drawing.

Not a very good solution since I did this in order to be able to switch
layouts on the fly (osa1#318) but it still doesn't work because we don't always
align every line (i.e topic line, server stuff).
@osa1 osa1 modified the milestones: v0.10, v1.0 Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug libtiny_tui Issues/PRs related to the TUI library
Projects
None yet
Development

No branches or pull requests

1 participant