fyne v2.0 Release Notes
Release Date: 2021-01-22 // over 3 years ago-
๐ Changes that are not backward compatible
These changes may break some apps, please read the โฌ๏ธ upgrading doc for more info โก๏ธ The import path is now
fyne.io/fyne/v2
when you are ready to make the update.Coordinate system to float32
- Size and Position units were changed from int to float32
Text.TextSize
moved to float32 andfyne.MeasureText
now takes a float32 size parameter- Removed
Size.Union
(useSize.Max
instead) - Added fyne.Delta for difference-based X, Y float32 representation
- DraggedEvent.DraggedX and DraggedY (int, int) to DraggedEvent.Dragged (Delta)
- ScrollEvent.DeltaX and DeltaY (int, int) moved to ScrollEvent.Scrolled (Delta)
โก๏ธ Theme API update
fyne.Theme
moved tofyne.LegacyTheme
and can be load to a new theme usingtheme.FromLegacy
- A new, more flexible, Theme interface has been created that we encourage developers to use
๐ The second parameter of
theme.NewThemedResource
was removed, it was previously ignoredThe desktop.Cursor definition was renamed desktop.StandardCursor to make way for custom cursors
๐ Button
Style
andHideShadow
were removed, useImportance
โฌ๏ธ iOS apps preferences will be lost in this upgrade as we move to more advanced storage
๐ Dialogs no longer show when created, unless using the ShowXxx convenience methods
Entry widget now contains scrolling so should no longer be wrapped in a scroll container
โ Removed deprecated types including:
dialog.FileIcon
(nowwidget.FileIcon
)widget.Radio
(nowwidget.RadioGroup
)widget.AccordionContainer
(nowwidget.Accordion
)layout.NewFixedGridLayout()
(nowlayout.NewGridWrapLayout()
)widget.ScrollContainer
(nowcontainer.Scroll
)widget.SplitContainer
(nowcontainer.Spilt
)widget.Group
(replaced bywidget.Card
)widget.Box
(nowcontainer.NewH/VBox
, withChildren
field moved toObjects
)widget.TabContainer
andwidget.AppTabs
(nowcontainer.AppTabs
)
๐ Many deprecated fields have been removed, replacements listed in API docs 1.4
- for specific information you can browse https://developer.fyne.io/api/v1.4/
โ Added
- ๐ Data binding API to connect data sources to widgets and sync data
- Add preferences data binding and
Preferences.AddChangeListener
- Add bind support to
Check
,Entry
,Label
,List
,ProgressBar
andSlider
widgets
- Add preferences data binding and
- Animation API for handling smooth element transitions
- Add animations to buttons, tabs and entry cursor
- Storage repository API for connecting custom file sources
- Add storage functions
Copy
,Delete
andMove
forURI
- Add
CanRead
,CanWrite
andCanList
to storage APIs
- Add storage functions
- ๐ New Theme API for easier customisation of apps
- Add ability for custom themes to support light/dark preference
- Support for custom icons in theme definition
- New
theme.FromLegacy
helper to use old theme API definitions
- โ Add fyne.Vector for managing x/y float32 coordinates
- โ Add MouseButtonTertiary for middle mouse button events on desktop
- โ Add
canvas.ImageScaleFastest
for faster, less precise, scaling - โ Add new
dialog.Form
that will phase outdialog.Entry
- โ Add keyboard control for main menu
- โ Add
Scroll.OnScrolled
event for seeing changes in scroll container - โ Add
TextStyle
andOnSubmitted
toEntry
widget - โ Add support for
HintText
and showing validation errors inForm
widget - โ Added basic support for tab character in
Entry
,Label
andTextGrid
๐ Changed
- ๐ Coordinate system is now float32 - see breaking changes above
- ๐ ScrollEvent and DragEvent moved to Delta from (int, int)
- ๐ Change bundled resources to use more efficient string storage
- ๐ Left and Right mouse buttons on Desktop are being moved to
MouseButtonPrimary
andMouseButtonSecondary
๐ Many optimisations and widget performance enhancements
Moving to new
container.New()
andcontainer.NewWithoutLayout()
constructors (replacingfyne.NewContainer
andfyne.NewContainerWithoutLayout
)Moving storage APIs
OpenFileFromURI
,SaveFileToURI
andListerForURI
toReader
,Writer
andList
functions
๐ Fixed
- Validating a widget in widget.Form before renderer was created could cause a panic
- โ Added file and folder support for mobile simulation support (#1470)
- Appending options to a disabled widget.RadioGroup shows them as enabled (#1697)
- Toggling toolbar icons does not refresh (#1809)
- Black screen when slide up application on iPhone (#1610)
- Properly align Label in FormItem (#1531)
- Mobile dropdowns are too low (#1771)
- Cursor does not go down to next line with wrapping (#1737)
- Entry: while adding text beyond visible reagion there is no auto-scroll (#912)