tramhao / termusic

Music Player TUI written in Rust
GNU General Public License v3.0
968 stars 42 forks source link

Album cover positioning and scale isn't updated to adapt to new terminal size #250

Open Porkepix opened 3 months ago

Porkepix commented 3 months ago

When changing the size of the terminal (many situations where this can happen), the general TUI is resized and adapted to the new terminal size. The album cover however gets stuck to the size it knew when Termusic started, even when moving to a new track. Going back to the initial size is fine, but any other size will result to a cover of the wrong size (going out of the terminal because too big if we reduce its size, or being ridiculously small if we made the terminal much bigger), and not located the way it should be.

tramhao commented 3 months ago

Yes, it's a headache now. I want to switch to ratatui-image. It's better to integrate into user interface. Currently it's hovering.

Porkepix commented 3 months ago

Mmmh, that might not fix this, though, as I didn't knew I went to check what this is and landed on https://crates.io/crates/ratatui-image where it shows that depending on terminal, it might lack features. And yeah, I observed the issue from Alacritty, and it shows it doesn't support resizing.

This kind of things really seems to be a real pain.

tramhao commented 3 months ago

By the way, for the time being you can manually adjust the size of cover on the fly.

Porkepix commented 3 months ago

By the way, for the time being you can manually adjust the size of cover on the fly.

Yes, but that wouldn't be very handy on a terminal constantly changing its size (tiling compositor).