From a0d5d3fce937408720a9e93310cf1885e814abf8 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Thu, 22 Oct 2020 16:03:09 +0100 Subject: [PATCH] Fix bad maths on scroll resize optimisations Fixes #1245 --- widget/scroller.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widget/scroller.go b/widget/scroller.go index 28c3d5f1b8..81a92912c1 100644 --- a/widget/scroller.go +++ b/widget/scroller.go @@ -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 }