Skip to content

Commit

Permalink
Fix bad maths on scroll resize optimisations
Browse files Browse the repository at this point in the history
Fixes #1245
  • Loading branch information
andydotxyz committed Oct 22, 2020
1 parent fc4e4ad commit a0d5d3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion widget/scroller.go
Expand Up @@ -284,7 +284,8 @@ func (r *scrollContainerRenderer) Refresh() {
// push updated content object to baseRenderer
r.BaseRenderer.SetObjects([]fyne.CanvasObject{r.scroll.Content})
}
if r.oldMinSize == r.scroll.Content.MinSize() && r.scroll.Content.Size() == r.oldMinSize {
if r.oldMinSize == r.scroll.Content.MinSize() && r.oldMinSize == r.scroll.Content.Size() &&
(r.scroll.Size().Width <= r.oldMinSize.Width && r.scroll.Size().Height <= r.oldMinSize.Height) {
r.layoutBars(r.scroll.Size())
return
}
Expand Down

0 comments on commit a0d5d3f

Please sign in to comment.