Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fyne-io/fyne
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.4
Choose a base ref
...
head repository: fyne-io/fyne
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.1.0
Choose a head ref

Commits on Jan 14, 2021

  1. basic POC of tabs

    adrianre12 committed Jan 14, 2021
    Copy the full SHA
    4e1b92b View commit details

Commits on Jan 19, 2021

  1. Copy the full SHA
    9a19c8f View commit details
  2. Copy the full SHA
    99453c6 View commit details
  3. updated textgrid.go

    adrianre12 committed Jan 19, 2021
    Copy the full SHA
    976b3a0 View commit details

Commits on Jan 20, 2021

  1. .

    adrianre12 committed Jan 20, 2021
    Copy the full SHA
    bfce0ee View commit details
  2. .

    adrianre12 committed Jan 20, 2021
    Copy the full SHA
    54d6ea7 View commit details
  3. Copy the full SHA
    19ee1b7 View commit details
  4. removed dev

    adrianre12 committed Jan 20, 2021
    Copy the full SHA
    01ae9f4 View commit details
  5. Added TabWidth to v2 theme

    adrianre12 committed Jan 20, 2021
    Copy the full SHA
    b9ed7b1 View commit details
  6. deleted dev

    adrianre12 committed Jan 20, 2021
    Copy the full SHA
    1b864a3 View commit details
  7. ran go tidy

    adrianre12 committed Jan 20, 2021
    Copy the full SHA
    9e241ef View commit details
  8. Copy the full SHA
    8ec8382 View commit details
  9. Optimize the cost of calling on the main/draw threads

    Calling a function on the main thread is a common operation
    in Go's GUI programming. For instance, the runOnMain must
    be called at each render loop.
    
    Previously, the runOnMain allocates a done channel to wait
    for a scheduled call on the main thread to complete and thus
    can produce the amount of work and awake the garbage collector
    quite often. Instead of allocating a channel for each call
    on the main thread, this change uses a channel pool and
    optimizes this particular case.
    
    Aside, the calls on the draw thread can also be optimized and
    use the same channel pool.
    
    Benchmark results:
    
    name          old time/op     new time/op      delta
    RunOnMain-16   5.26µs ±1%      5.02µs ±2%     -4.64%  (p=0.000 n=10+10)
    RunOnDraw-16  44.5µs ±12%     43.2µs ±10%        ~    (p=0.393 n=10+10)
    
    name          old alloc/op   new alloc/op      delta
    RunOnMain-16    96.0B ±0%       0.0B        -100.00%  (p=0.000 n=10+10)
    RunOnDraw-16     107B ±3%        10B ±33%    -90.15%  (p=0.000 n=10+10)
    
    name          old allocs/op new allocs/op      delta
    RunOnMain-16     1.00 ±0%      0.00         -100.00%  (p=0.000 n=10+10)
    RunOnDraw-16     2.00 ±0%      1.00 ±0%      -50.00%  (p=0.000 n=10+10)
    changkun committed Jan 20, 2021
    Copy the full SHA
    1842901 View commit details

Commits on Feb 1, 2021

  1. Use full background to indicate hover and selection (#1875)

    * Show Tree Selection with Background
    
    * Show List Selection with Background
    
    * Use theme.FocusColor
    
    * Full width separators
    stuartmscott authored Feb 1, 2021
    Copy the full SHA
    86c5667 View commit details
  2. Fixed a typo

    adityaraute authored and andydotxyz committed Feb 1, 2021
    Copy the full SHA
    9a0f87c View commit details

Commits on Feb 3, 2021

  1. Remove custom bundler scripts and rebundle with latest fyne bundle (#…

    …1898)
    
    This removes the `gen.go` custom bundle scripts that were used in `cmd/fyne_demo` and `cmd/fyne_demo` in favour of using `go:generate` in combination with `fyne bundle`.
    The only remaining custom bundle script is the one in the theme package, but that requires a lot more work due to the fonts combined with the ammount of icons.
    Jacalz authored Feb 3, 2021
    Copy the full SHA
    4aac2eb View commit details

Commits on Feb 4, 2021

  1. Fix issue with Focus call crashing

    Fixes #1893
    andydotxyz committed Feb 4, 2021
    6
    Copy the full SHA
    3b7e52a View commit details
  2. Don't assume we own the validation

    Fixes #1890
    andydotxyz committed Feb 4, 2021
    Copy the full SHA
    4763025 View commit details

Commits on Feb 6, 2021

  1. Remove change from 2.0.0 release notes that was in 1.4.3

    This removes an item from the changelog that had already been released in the prior version.
    Jacalz committed Feb 6, 2021
    Copy the full SHA
    0ed8ee7 View commit details
  2. Merge pull request #1907 from Jacalz/duplicated-change

    Remove change from 2.0.0 release notes that was in 1.4.3
    Jacalz authored Feb 6, 2021
    Copy the full SHA
    a344733 View commit details
  3. Copy the full SHA
    1d19919 View commit details
  4. Copy the full SHA
    f25ad26 View commit details
  5. Copy the full SHA
    fb6cceb View commit details
  6. A few usage text fixes

    Jacalz committed Feb 6, 2021
    Copy the full SHA
    c9a858e View commit details
  7. Fix various issues

    Jacalz committed Feb 6, 2021
    Copy the full SHA
    8c80fda View commit details
  8. Make staticcheck happy

    Jacalz committed Feb 6, 2021
    Copy the full SHA
    f329d70 View commit details
  9. Fix a missing return

    Jacalz committed Feb 6, 2021
    Copy the full SHA
    35e9812 View commit details
  10. Add in all deprecated stuff

    Jacalz committed Feb 6, 2021
    Copy the full SHA
    6908f7d View commit details
  11. Major rearchitecture to not export cli commands

    WIll need work in the future to propertly expose bundler, packager, installer and releaser.
    Jacalz committed Feb 6, 2021
    Copy the full SHA
    2532ce7 View commit details
  12. Copy the full SHA
    2271ac7 View commit details
  13. Better deprecation text

    Jacalz committed Feb 6, 2021
    Copy the full SHA
    d456120 View commit details
  14. Copy the full SHA
    bac5a24 View commit details
  15. Copy the full SHA
    f02ca7d View commit details
  16. Copy the full SHA
    2b2c9eb View commit details
  17. Fix the alias of the getter

    Jacalz committed Feb 6, 2021
    Copy the full SHA
    4f12a76 View commit details
  18. Copy the full SHA
    9eb0f4b View commit details
  19. Copy the full SHA
    8471357 View commit details
  20. Copy the full SHA
    30088f8 View commit details
  21. Copy the full SHA
    9307321 View commit details
  22. Style change to if else

    adrianre12 committed Feb 6, 2021
    Copy the full SHA
    267a252 View commit details
  23. Fix background colour not applying until theme change

    The background colour of the progress bar did not change the background colour until the theme changed.
    Jacalz committed Feb 6, 2021
    Copy the full SHA
    6575419 View commit details
  24. Merge pull request #1911 from Jacalz/fix-progressbar-background

    Fix background colour not applying until theme change
    Jacalz authored Feb 6, 2021
    Copy the full SHA
    8d530fb View commit details
  25. Merge pull request #1858 from Jacalz/urfave-cli

    Port cmd/fyne to using urfave/cli
    Jacalz authored Feb 6, 2021
    Copy the full SHA
    75ddc86 View commit details

Commits on Feb 7, 2021

  1. Copy the full SHA
    a4b3843 View commit details
  2. Missed vendor update

    andydotxyz committed Feb 7, 2021
    Copy the full SHA
    990fd49 View commit details
  3. Copy the full SHA
    bed0e15 View commit details
  4. Copy the full SHA
    0df584d View commit details
  5. Merge pull request #1837 from changkun/develop-mainthread

    Optimize the cost of calling on the main/draw threads
    andydotxyz authored Feb 7, 2021
    Copy the full SHA
    f1cb420 View commit details
  6. Merge pull request #1915 from andydotxyz/fix/1896

    Don't crash if keyboard controls are invoked too soon
    andydotxyz authored Feb 7, 2021
    Copy the full SHA
    5de58a6 View commit details
  7. Copy the full SHA
    8f867e3 View commit details
Showing 1,583 changed files with 97,762 additions and 43,024 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/mobile_tests.yml
Original file line number Diff line number Diff line change
@@ -7,11 +7,11 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.12.x, 1.15.x]
go-version: [1.14.x, 1.17.x]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: WillAbides/setup-go-faster@v1.6.0
with:
go-version: ${{ matrix.go-version }}

18 changes: 5 additions & 13 deletions .github/workflows/platform_tests.yml
Original file line number Diff line number Diff line change
@@ -7,43 +7,35 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.12.x, 1.15.x]
go-version: [1.14.x, 1.17.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: WillAbides/setup-go-faster@v1.5.0
id: setup-go-faster
with:
go-version: ${{ matrix.go-version }}

- name: Get dependencies
run: sudo apt-get update && sudo apt-get install gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev
if: ${{ runner.os == 'Linux' }}

#- name: Verify go modules
# run: |
# if [ "$GO111MODULE" == "on" ]
# then
# # For some reason `git diff-index HEAD` does not work properly if the following line is missing.
# git diff
# # check that go mod tidy does not change go.mod/go.sum
# go mod tidy && git diff-index --quiet HEAD -- || ( echo "go.mod/go.sum not up-to-date"; git diff-index HEAD --; false )
# fi

- name: Tests
run: go test -tags ci ./...

- name: Update coverage
run: |
GO111MODULE=off go get github.com/mattn/goveralls
set -e
go test -tags ci -covermode=atomic -coverprofile=coverage.out ./...
if [ $coverage -lt 69 ]; then echo "Test coverage lowered"; exit 1; fi
if: ${{ runner.os == 'Linux' }}

- name: Update PR Coverage
uses: shogo82148/actions-goveralls@v1
env:
GOROOT: ${{steps.setup-go-faster.outputs.GOROOT}}
with:
path-to-profile: coverage.out
if: ${{ runner.os == 'Linux' && github.event_name == 'push' }}
17 changes: 9 additions & 8 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
@@ -6,17 +6,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: WillAbides/setup-go-faster@v1.6.0
with:
go-version: '^1.15.x'
go-version: '1.16.x'

- name: Get dependencies
run: |
sudo apt-get update && sudo apt-get install gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev
GO111MODULE=off go get golang.org/x/tools/cmd/goimports
GO111MODULE=off go get github.com/fzipp/gocyclo/cmd/gocyclo
GO111MODULE=off go get golang.org/x/lint/golint
GO111MODULE=off go get honnef.co/go/tools/cmd/staticcheck
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
go install golang.org/x/lint/golint@latest
go install honnef.co/go/tools/cmd/staticcheck@v0.2.0
- name: Cleanup repository
run: rm -rf vendor/

@@ -27,10 +28,10 @@ jobs:
run: test -z $(goimports -e -d . | tee /dev/stderr)

- name: Gocyclo
run: gocyclo -over 50 .
run: gocyclo -over 30 .

- name: Golint
run: golint -set_exit_status $(go list -tags ci ./...)

- name: Staticcheck
run: CGO_ENABLED=1 staticcheck -f stylish ./...
run: staticcheck -go 1.14 ./...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ cmd/hello/hello
cmd/hello/hello.apk
cmd/hello/hello.app
cmd/hello/hello.exe
fyne-cross

### Tests
**/testdata/failed
77 changes: 0 additions & 77 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -9,3 +9,4 @@ Storm Hess <stormhess@gloryskulls.com>
Stuart Scott <stuart.murray.scott@gmail.com>
Jacob Alzén <>
Charles A. Daniels <charles@cdaniels.net>
Pablo Fuentes <f.pablo1@hotmail.com>
67 changes: 67 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,73 @@
This file lists the main changes with each version of the Fyne toolkit.
More detailed release notes can be found on the [releases page](https://github.com/fyne-io/fyne/releases).

## 2.1 - 17 September 2021

### Added

* 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 (#709)
* Add scroll functions for List, Table, Tree (#1892)
* Add selection and disabling to MenuItem
* Add Alignment to widget.Select (#2329)
* Expose ScanCode for keyboard events originating from hardware (#1523)
* Support macOS GPU switching (#2423)

### Changed

* 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) (#2298)
* Support multiple lines of text on button (#2378)
* 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

### Fixed

* Correctly align text tabs (#1791)
* Mobile apps theme does not match system (#472)
* Toolbar with widget.Label makes the ToolbarAction buttons higher (#2257)
* Memory leaks in renderers and canvases cache maps (#735)
* FileDialog SetFilter does not work on Android devices (#2353)
* Hover fix for List and Tree with Draggable objects
* Line resize can flip slope (#2208)
* Deadlocks when using widgets with data (#2348)
* Changing input type with keyboard visible would not update soft keyboards
* MainMenu() Close item does NOT call function defined in SetCloseIntercept (#2355)
* Entry cursor position with mouse is offset vertically by theme.SizeNameInputBorder (#2387)
* Backspace key is not working on Android AOSP (#1941)
* macOS: 'NSUserNotification' has been deprecated (#1833)
* macOS: Native menu would add new items if refreshed
* iOS builds fail since Go 1.16
* Re-add support for 32 bit iOS devices, if built with Go 1.14
* Android builds fail on Apple M1 (#2439)
* SetFullScreen(true) before ShowAndRun fails (#2446)
* Interacting with another app when window.SetFullScreen(true) will cause the application to hide itself. (#2448)
* Sequential writes to preferences does not save to file (#2449)
* Correct Android keyboard handling (#2447)
* MIUI-Android: The widget’s Hyperlink cannot open the URL (#1514)
* Improved performance of data binding conversions and text MinSize


## 2.0.4 - 6 August 2021

### Changed
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://pkg.go.dev/fyne.io/fyne/v2?tab=doc" title="Go API Reference" rel="nofollow"><img src="https://img.shields.io/badge/go-documentation-blue.svg?style=flat" alt="Go API Reference"></a>
<a href="https://github.com/fyne-io/fyne/releases/tag/v2.0.3" title="2.0.3 Release" rel="nofollow"><img src="https://img.shields.io/badge/version-2.0.3-blue.svg?style=flat" alt="2.0.3 release"></a>
<a href="https://github.com/fyne-io/fyne/releases/tag/v2.1.0" title="2.1.0 Release" rel="nofollow"><img src="https://img.shields.io/badge/version-2.1.0-blue.svg?style=flat" alt="2.1.0 release"></a>
<a href='http://gophers.slack.com/messages/fyne'><img src='https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=blue' alt='Join us on Slack' /></a>
<br />
<a href="https://goreportcard.com/report/fyne.io/fyne/v2"><img src="https://goreportcard.com/badge/fyne.io/fyne/v2" alt="Code Status" /></a>
@@ -14,12 +14,11 @@
It is designed to build applications that run on desktop and mobile devices with a
single codebase.

Version 2.0 is the current release of the Fyne API, this represented the first release since
1.0 that may break some API usage. It also added new features including data binding, animation,
storage repositories and a new more flexible theme API.
We also refreshed the default theme, adding animations, a focus colour and
redesigning the Entry, Select, SelectEntry, ProgressBar and ProgressBarInfinite widgets.
We are now working towards the next [big release](https://github.com/fyne-io/fyne/milestone/14)
Version 2.1 is the current release of the Fyne API, it introduced RichText
and the DocTabs container, as well as the document storage API and FyneApp.toml
metadata support.
We are now working towards the next big release, codenamed
[bowmore](https://github.com/fyne-io/fyne/milestone/15)
and more news will follow in our news feeds and GitHub project.

# Prerequisites
17 changes: 17 additions & 0 deletions app.go
Original file line number Diff line number Diff line change
@@ -57,6 +57,9 @@ type App interface {

// Storage returns a storage handler specific to this application.
Storage() Storage

// Lifecycle returns a type that allows apps to hook in to lifecycle events.
Lifecycle() Lifecycle
}

var app App
@@ -80,3 +83,17 @@ func CurrentApp() App {
}
return app
}

// Lifecycle represents the various phases that an app can transition through.
//
// Since: 2.1
type Lifecycle interface {
// SetOnEnteredForeground hooks into the app becoming foreground and gaining focus.
SetOnEnteredForeground(func())
// SetOnExitedForeground hooks into the app losing input focus and going into the background.
SetOnExitedForeground(func())
// SetOnStarted hooks into an event that says the app is now running.
SetOnStarted(func())
// SetOnStopped hooks into an event that says the app is no longer running.
SetOnStopped(func())
}
Loading