danbee / persephone

macOS MPD client written in Swift.
https://persephone.fm
MIT License
215 stars 18 forks source link

Maintain relative scroll position on resize #16

Closed danbee closed 5 years ago

danbee commented 5 years ago

By default, the collection view keeps the scroll position in exactly the same place as the view resizes. This causes the albums to jump about a lot as they relayout. This PR recalculates the scroll position based on the percentage the view is scrolled down. This makes for a much less janky experience.

danbee commented 5 years ago

Thanks for the review @sharplet!