popcorn-official / popcorn-desktop

Popcorn Time is a multi-platform, free software BitTorrent client that includes an integrated media player ( Windows / Mac / Linux ) A Butter-Project Fork
https://popcorn-time.site
Other
8.93k stars 607 forks source link

Torrent list item extends to second line sometime due to varying width of down/up rate #2035

Closed tkSimon closed 3 years ago

tkSimon commented 3 years ago

Operating System Version: Linux, Fedora 33

Popcorn Time Version: git/development

Download date: 6c32f152b4e901bb40dd562d34ebcee6169bbcd3

Expected Behaviour

List items should be contained in a single line.

Actual Behaviour

As the down/up speed changes, sometime one of the speed indicating elements moves to a second line.

Steps to reproduce the behaviour

I suppose this really depends on the font used, and on the OS.

  1. Start download
  2. Observe varying speed
  3. Observe up/download element sometimes moves to second line, extending the torrent list entry to two lines

Screenshot(s) of issue

torrent_list_wrap

tkSimon commented 3 years ago

Thanks for looking into this. While it's now longer line breaking, there's now some unused space between titel and the d/u rate indicators. Maybe something using flex boxes would be the best fit? Check this out: https://css-tricks.com/flexbox-truncated-text/ What do you think?

tkSimon commented 3 years ago

I fiddled around a bit and came up with this: https://github.com/tkSimon/popcorn-desktop/tree/seedbox-felxbox Seems to work fine. Dynamically sizing the title based on available space, depending on width of d/u rate and window size.