The latest news from the Fyne community

2020

2019

2018

v1.4 Released

After a lot of hard work from a dedicated team we are excited to announce release 1.4 of the Fyne toolkit. This is a huge update with some great new functionality and it paves the way for some bigger changes in 2.0 early in 2021.

Nearly 700 commits from 15 different contributors has made this a bumper release. A comprehensive list of new features appears later, but first let’s explore two big changes.

Theme update

For the first time since the initial public release we took the opportunity to refresh the standard theme. For 1.4 we have updated the color scheme to better reflect standard material design colors and to use the same primary color on light and dark mode themes. We have also included an update to the fyne_demo app that is better able to show off all the new features that come as standard in this latest release.

Not only does this update provide a more vibrant look and feel to all applications but it enabled us to allow users to choose alternative primary colors to suit their tastes. This selection can be made through the fyne_settings app or the File->Settings menu item in fyne_demo.

Collection widgets

The 1.4 release brings many new widgets to Fyne, but the biggest of those are the new collection widgets - List, Table and Tree. When looking at the existing widget set we realised that showing large amounts of data was not well supported, and so we set out to change this.

The collection widgets combine caching and a data abstraction that allow them to provide high performance presentation for very large datasets. They can handle many thousands of data rows with different arrangements based on widget. List will show one dimensional data, Table is for two dimensions (rows and columns) and the Tree can show data with a hierarchical structure. Their performance is based on what is currently on screen - the rest of the dataset is not read until scrolled into view.

Each widget has a similar API design for querying the data size and configuring presentation. The List widget, for example, requires a developer to provide the following functions (normally passed in the NewList() constructor):

	Length       func() int
	CreateItem   func() fyne.CanvasObject
	UpdateItem   func(id ListItemID, item fyne.CanvasObject)

In this example Length returns the number of rows to display. Each time a new graphical item is required (for setup or if the widget expands) the CreateItem will be called and the developer should return a template CanvasObject. When data will be displayed the UpdateItem will be called, specifying the data index to lookup and the template object that should be configured.

This is a big step forward for complex application use-cases and we can’t wait to see what the community builds with the new functionality. There are many great new features also included in this release, see the full list below.

Release notes

The following is a list of highlights of what is included in this release. As you can see there are a number of APIs that have been deprecated (see “Changed” below) many of which already have new replacements. Some of the deprecated areas are in preparation for some big changes in the 2.0 release that we are now working towards.

For more information about how these changes may impact your application please see our upgrading guide.

Added

  • List (#156), Table (#157) and Tree (#254) collection widgets
  • Card, FileItem, Separator widgets
  • ColorPicker dialog
  • User selection of primary colour
  • Container API package to ease using layouts and container widgets
  • Add input validation
  • ListableURI for working with directories etc
  • Added PaddedLayout
  • Window.SetCloseIntercept (#467)
  • Canvas.InteractiveArea() to indicate where widgets should avoid
  • TextFormatter for ProgressBar
  • FileDialog.SetLocation() (#821)
  • Added dialog.ShowFolderOpen (#941)
  • Support to install on iOS and android with ‘fyne install’
  • Support asset bundling with go:generate
  • Add fyne release command for preparing signed apps
  • Add keyboard and focus support to Radio and Select widgets

Changed

  • Theme update - new blue highlight, move buttons to outline
  • Android SDK target updated to 29
  • Mobile log entries now start “Fyne” instead of “GoLog”
  • Don’t expand Select to its largest option (#1247)
  • Button.HideShadow replaced by Button.Importance = LowImportance
  • Deprecate NewContainer in favour of NewContainerWithoutLayout
  • Deprecate HBox and VBox in favour of new container APIs
  • Move Container.AddObject to Container.Add matching Container.Remove
  • Start move from widget.TabContainer to container.AppTabs
  • Replace Radio with RadioGroup
  • Deprecate WidgetRenderer.BackgroundColor

Fixed

The list of resolved issues is very long, if you want to see it in full head to the change log.

Get In Touch!


We're excited to hear from anyone interested in the project. Whether it's to find out more, provide suggestions or to get involved - drop us a line!

If you would like to join us on slack but are not yet signed up to the golang slack server you can request an invite.