The latest news from the Fyne community

v2.1 for RichText and DocTabs goodness :)

Sep 21, 2021

The v2.1.0 release represents a huge step forward since 2.0 - just as many commits as went into the v2.0.0 release! We added new widgets, a Lifecycle API, storage helpers, build metadata and lots of optimisations too. Check out the full release below and let us know what you think :)

Note that custom focusable widgets will not automatically be focussed on tap any more, you may wish to update your code so it requests focus on tapped (see https://developer.fyne.io/api/v2.1/upgrading).

Added features

We have some great new features for your app like DocTabs, CheckGroup and a new metadata file, but perhaps the coolest new feature is the RichText widget! We have included a Markdown parser that can be used to create rich text using widget.NewRichTextWithMarkdown("* Text"), this means you can really easily include rich content in your apps. It is even a simple task to make a markdown preview for an editor widget like this:

The complete list of new additions is as follows:

  • DocTabs container for handling multiple open files
  • Lifecycle API for handling foreground, background and other event
  • Add RichText widget and Markdown parser
  • Add TabWidth to TextStyle to specify tab size in spaces
  • Add CheckGroup widget for multi-select
  • Add FyneApp.toml metadata file to ease build commands
  • Include http and https in standard repositories
  • Add selection color to themes
  • Include baseline information in driver font measurement
  • Document storage API (App.Storage().Create() and others)
  • Add “App Files” to file dialog for apps that use document storage
  • Tab overflow on AppTabs
  • Add URI and Unbound type to data bindings
  • Add keyboard support for menus, pop-ups and buttons
  • Add SimpleRenderer to help make simple widgets
  • Add scroll functions for List, Table, Tree
  • Add selection and disabling to MenuItem
  • Add Alignment to widget.Select
  • Expose ScanCode for keyboard events originating from hardware
  • Support macOS GPU switching

Changed

The following items have changed and may require custom widgets or complex code to be updated accordingly.

  • Focusable widgets are no longer focused on tap, add canvas.Focus(obj) in Tapped handler if required
  • Move to background based selection for List, Table and Tree
  • Update fyne command line tool to use –posix style parameters
  • Switch from gz to xz compression for unix packages
  • Performance improvements with line, text and raster rendering
  • Items not yet visible can no longer be focused
  • Lines can now be drawn down to 1px (instead of 1dp)
  • Support multiple lines of text on button
  • Improved text layout speed by caching string size calculations
  • Updated to require Go 1.14 so we can use some new features
  • Window Resize request is now asynchronous
  • Up/Down keys take cursor home/end when on first/last lines respectively

There are also more than 25 other fixes in that improve the stability of our toolkit. Let us know what you think and how we can improve further :).


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 the community for a chat you'll find us in the #fyne channel on gophers Slack or on our Discord server. If you are not already a member of the communities you can use a Slack invite or Discord invite.

#fyne

(Slack sign up)
(Discord sign up)