Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only refresh scroll chrome when scroller is resized #5472

Merged
merged 4 commits into from
Jan 29, 2025

Conversation

andydotxyz
Copy link
Member

@andydotxyz andydotxyz commented Jan 27, 2025

Progresses #5456

Checklist:

  • Tests included.<- fewer refreshes, same test results :)
  • Lint and formatter run with no errors.
  • Tests all pass.

@dweymouth
Copy link
Contributor

dweymouth commented Jan 27, 2025

This is a good change (though haven't tested it yet) but just noting that it doesn't fix #5456 - the root cause there is the widgets themselves. e.g. here in Tree, it refreshes the entire content in the OffsetUpdated callback from the scroller: https://github.com/fyne-io/fyne/blob/develop/widget/tree.go#L491 (and similarly in table)

Also doing a full refresh on any resize here: https://github.com/fyne-io/fyne/blob/develop/widget/tree.go#L593

Widget.Refresh running thread handling code was not great for potential loop scenarios
@coveralls
Copy link

coveralls commented Jan 27, 2025

Coverage Status

coverage: 60.845% (+1.7%) from 59.108%
when pulling 8205f34 on andydotxyz:fix/5456
into 7bfcab6 on fyne-io:develop.

@andydotxyz
Copy link
Member Author

andydotxyz commented Jan 27, 2025

It's a shame - in my testing this was night and day difference - using the split in fyne_demo is really laggy on develop and smooth with this PR applied.

Yes there is an "over refresh" in there still - but it's the lesser of the two. Maybe there are two different fixes to the issue reported as the resize and scroll refreshes do not have the same root cause?

Copy link
Member

@Jacalz Jacalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looking really good. Just a small change I think you accidentally left in there (or due to being based on the wrong commit compared to develop).

widget/widget.go Show resolved Hide resolved
Jacalz
Jacalz previously approved these changes Jan 28, 2025
@andydotxyz andydotxyz merged commit fba693b into fyne-io:develop Jan 29, 2025
11 checks passed
@andydotxyz andydotxyz deleted the fix/5456 branch January 29, 2025 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants