Skip to content

With v2.6.0 Fyne is faster than ever and passing Go's race checks too :)

Latest
Compare
Choose a tag to compare
@andydotxyz andydotxyz released this 10 Apr 15:38
· 1 commit to master since this release

This massive update to Fyne introduces a new threading model that allows it to be a lot faster whilst being free of data races as well!
Developers who use background processing will need to make use of the new fyne.Do and anyone with custom widgets that make use of locking to provide thread safety can now remove it as all Fyne callbacks occur on the same goroutine.

Your app may need a few updates (logs will show you where behaviour changes should be added) but can see up to 3x speed increase depending on the number of graphical elements and how frequently they are updated.

Added

  • Added [fyne.Do] and [fyne.DoAndWait] to call from goroutines. This makes it possible to eliminate race conditions.
  • Add "Migrations" section to FyneApp.toml to mark migrations like fyneDo = true
  • Add Calendar and DateEntry widgets
  • Add a third state ([Check.Partial]) to the check widget (#3576)
  • Add ability to select label text using new [Label.Selectable]
  • Support for storage on web driver (#4634)
  • test: Add RenderToMarkup and RenderObjectToMarkup (#5124)
  • Add ability to choose a text size for label widget (#5561)
  • Show soft keyboard on Web build with mobile device (#4394)
  • APIs for testing dialogs (#2771)
  • Add ScrollToOffset functions to collection widgets
  • Add Prepend method to Accordion (#5418)
  • Support Apple intel apps on M1/2 (using Rosetta) (#3971)
  • Ability to turn off re-scaling when a window moves between monitors for Linux (#5164)
  • Add functions to get text location for position (and vice-versa) with a TextGrid
  • Add support for scrolling many lines in TextGrid
  • Add Append function to TextGrid
  • Add Prepend function to Accordion
  • Support custom titles in file dialogs using SetTitleText
  • Add utility methods to handle colouring of SVG images
  • Add preference bind APIs for list (slice) types
  • Added Greek, Ukrainian & Chinese (Simplified) translations

Changed

  • All callbacks from Fyne drivers and widgets now call on the same goroutine
  • Shortcuts on menu items are now called before widget or canvas shortcuts (#2627)
  • ActionItems in an Entry should now match the standard button size
  • Tidy the fyne CLI and moved to tools repo (#4920)
  • When scroll bar is expanded, clicking above or below the bar scrolls up or down (#4922)
  • Add generics to data binding package
  • File picker now ignores case (#5113)
  • Consistent callback order for dialogs - data before OnClosed
  • Improve drop-shadow to show light from top position
  • load markdown images from origin when not a URL
  • Debug now disabled by default for WASM builds
  • Updated theme of inner window borders with circle style and more customisations
  • Change Accordion.OpenAll when used with single-open accordion to open the first item instead of none

Fixed

  • Fixed all known race conditions
  • Decouple clipboard from fyne.Window enhancement (#4418)
  • Odd looking SelectEntry with long PlaceHolder (#4430)
  • Crash when resizing mobile simulator window (#5397)
  • Deadlock when creating widget too fast (#3203)
  • Application crashes on .Resize() (#5206)
  • Linux (ubuntu) menu shortcuts not working blocker (#5355)
  • Slider snaps back to min-value on Android (#5430)
  • SoftwareCanvas resize only works properly if it's the last step bug (#5548)
  • Showing a disabled menu items with a non-SVG icon generates Fyne error bug (#5557)
  • Trying to hide subsequently created popups in a goroutine results in Fyne runtime panic (#5564)
  • Table passes negative index to onSelected function (#4917)
  • storage.Move() fails to move directories (#5493)
  • Tree and Table widgets refresh full content on any scroll or resize (#5456)
  • Memory leak from widget renderers never being destroyed blocker (#4903)
  • On MacOS SysTray menu does not show when clicked on an active space in second monitor (#5223)
  • On MacOs systray tooltip does not show when full window app is active (#5282)
  • Panic when opening and closing windows quickly bug (#3280)
  • Goroutines showing same window at similar times can forget size races (#4535)
  • Panic when confirming or dismissing file open dialog races (#3279)
  • richImage may freeze the application in some cases. (#3510)
  • Memory usage increases significantly per character in Entry (#2969)
  • Submenus not working on mobile (#5398)
  • ListWidget with data index out of bounds when modified bound data (#5227)
  • After scrolling, first selection in a list jumps that item to the bottom of the container (#5605)
  • Accordion could have incorrect layout with multiple items open
  • Prevent tapping within a popup from dismissing it, even if non-modal (#5360)
  • Resolved performance issues in text and custom theme handling

This is obviously a big update - please get in touch if you have any questions or challenges adopting this new version.
See important upgrade notes at https://docs.fyne.io/api/v2.6/upgrading.