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.1.3
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.4
Choose a head ref

Commits on Nov 11, 2021

  1. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    f764615 View commit details
  2. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    6b33dbc View commit details
  3. Better wording for sizes

    Jacalz committed Nov 11, 2021

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    59a5399 View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    94cadda View commit details

Commits on Dec 6, 2021

  1. Copy the full SHA
    75be542 View commit details
  2. Added date to changelog

    andydotxyz committed Dec 6, 2021
    Copy the full SHA
    5300e2c View commit details

Commits on Dec 10, 2021

  1. Fixing links

    Some links needed fixing to work:
    - Vision
    - Roadmap
    - Slack
    - Issue list
    - Contributing Code
    RocksteadyTC authored and andydotxyz committed Dec 10, 2021
    Copy the full SHA
    6c35798 View commit details

Commits on Jan 5, 2022

  1. Copy the full SHA
    8d84be5 View commit details

Commits on Mar 3, 2022

  1. Copy the full SHA
    cd997be View commit details

Commits on Mar 8, 2022

  1. Move the fixed size ensuring size to the end of window setup

    Fixes order of operation issues such as #2819
    andydotxyz committed Mar 8, 2022
    Copy the full SHA
    02c89ca View commit details

Commits on Mar 10, 2022

  1. Copy the full SHA
    dfcb0ea View commit details

Commits on Mar 11, 2022

  1. Merge pull request #2829 from andydotxyz/fix/2819

    Move the fixed size ensuring size to the end of window setup
    andydotxyz authored Mar 11, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    520867c View commit details

Commits on Mar 14, 2022

  1. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    929b6ff View commit details
  2. Copy the full SHA
    39b36b1 View commit details
  3. Merge pull request #2847 from Jacalz/remove-all-slow

    Add docs for container.Remove() when removing everything
    Jacalz authored Mar 14, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ed8d41a View commit details
  4. Copy the full SHA
    e58e527 View commit details

Commits on Mar 15, 2022

  1. prep v2.1.4 release notes

    andydotxyz committed Mar 15, 2022
    Copy the full SHA
    70f2944 View commit details
  2. fix some typos (#2845)

    Signed-off-by: cuishuang <imcusg@gmail.com>
    cuishuang authored Mar 15, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7595a4b View commit details

Commits on Mar 17, 2022

  1. Copy the full SHA
    771f964 View commit details
  2. Copy the full SHA
    c8fbd52 View commit details
  3. How did this typo slip in?

    andydotxyz committed Mar 17, 2022
    1
    Copy the full SHA
    7229e88 View commit details
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -2,3 +2,5 @@ contact_links:
- name: Ask a question
url: https://fyne.io/support/
about: For a toolkit question or help with your code go to our support page

blank_issues_enabled: false
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -21,3 +21,4 @@ Fixes #(issue)
- [ ] Public APIs match existing style.
- [ ] Any breaking changes have a deprecation path or have been discussed.
- [ ] Updated the vendor folder (using `go mod vendor`).
- [ ] Check for binary size increases when importing new modules.
4 changes: 2 additions & 2 deletions .github/workflows/platform_tests.yml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.14.x, 1.17.x]
go-version: [1.14, 1.17]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
@@ -38,4 +38,4 @@ jobs:
GOROOT: ${{steps.setup-go-faster.outputs.GOROOT}}
with:
path-to-profile: coverage.out
if: ${{ runner.os == 'Linux' && github.event_name == 'push' }}
if: ${{ runner.os == 'Linux' && matrix.go-version == '1.17' && github.event_name == 'push' }}
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,7 +3,15 @@
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.3 - 24 February 2021
## 2.1.4 - 17 March 2022

* SetTheme() is not fully effective for widget.Form (#2810)
* FolderOpenDialog SetDismissText is ineffective (#2830)
* window.Resize() does not work if SetFixedSize(true) is set after (#2819)
* Container.Remove() race causes crash (#2826, #2775, #2481)
* FixedSize Window improperly sized if contains image with ImageFillOriginal (#2800)

## 2.1.3 - 24 February 2022

### Fixed

@@ -229,7 +237,7 @@ More detailed release notes can be found on the [releases page](https://github.c
* Correct initial state of entry validation
* fix entry widget mouse drag selection when scrolled
* List widget panic when refreshing after changing content length (#1864)
* Fix image caching that was too agressive on resize
* Fix image caching that was too aggressive on resize
* Pointer and cursor misalignment in widget.Entry (#1937)
* SIGSEGV Sometimes When Closing a Program by Clicking a Button (#1604)
* Advanced Color Picker shows Black for custom primary color as RGBA (#1970)
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ There are various ways to contribute, perhaps the following helps you know how t

If you've found something wrong we want to know about it, please help us understand the problem so we can resolve it.

1. Check to see if this already is recorded, if so add some more information [issue list](/fyne-io/fyne/issues)
1. Check to see if this already is recorded, if so add some more information [issue list](https://github.com/fyne-io/fyne/issues)
2. If not then create a new issue using the [bug report template](https://github.com/fyne-io/fyne/issues/new?assignees=&labels=&template=bug_report.md&title=)
3. Stay involved in the conversation on the issue as it is triaged and progressed.

@@ -27,12 +27,12 @@ If you can follow these steps then your code should get accepted fast.
## Adding a feature

It's always good news to hear that people want to contribute functionality.
But first of all check that it fits within our [[Vision]] and if we are already considering it on our [[Roadmap]].
If you're not sure then you should join our #fyne-contributors channel on the gophers Slack server
But first of all check that it fits within our [Vision](https://github.com/fyne-io/fyne/wiki/Vision) and if we are already considering it on our [Roadmap](https://github.com/fyne-io/fyne/wiki/Roadmap).
If you're not sure then you should join our #fyne-contributors channel on the [Gophers Slack server](https://gophers.slack.com/app_redirect?channel=fyne-contributors).

Once you are ready to code then the following steps should give you a smooth process:

1. Read through the "Contributing Code" section further down this page.
1. Read through the [Contributing Code](#contributing-code) section further down this page.
2. Think about how you would structure your code and how it can be tested.
3. Write some code and enjoy the ease of writing Go code for even a complex project :).
4. Run the tests and make sure everything still works as expected using `go test ./...`.
4 changes: 2 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@ import (
)

// An App is the definition of a graphical application.
// Apps can have multiple windows, it will exit when the first window to be
// shown is closed. You can also cause the app to exit by calling Quit().
// Apps can have multiple windows, by default they will exit when all windows
// have been closed. This can be modified using SetMaster() or SetCloseIntercept().
// To start an application you need to call Run() somewhere in your main() function.
// Alternatively use the window.ShowAndRun() function for your main window.
type App interface {
2 changes: 1 addition & 1 deletion cmd/fyne/commands/command.go
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import "fyne.io/fyne/v2/cmd/fyne/internal/commands"
// Command defines the required functionality to provide a subcommand to the "fyne" tool.
//
// Deprecated: Access to the internal cli commands are being removed.
// Better versions of bundler, installer, packager and releaser will be avaliable in the future.
// Better versions of bundler, installer, packager and releaser will be available in the future.
type Command interface {
AddFlags()
PrintHelp(string)
2 changes: 1 addition & 1 deletion cmd/fyne/internal/mobile/binres/binres_test.go
Original file line number Diff line number Diff line change
@@ -329,7 +329,7 @@ func compareStrings(t *testing.T, a, b []string) error {
}
if err == nil && v == "__" {
if !strings.HasPrefix(x, "4.0.") {
// as of the time of this writing, the current version of build tools being targetted
// as of the time of this writing, the current version of build tools being targeted
// reports 4.0.4-1406430. Previously, this was 4.0.3. This number is likely still due
// to change so only report error if 4.x incremented.
//
9 changes: 6 additions & 3 deletions container.go
Original file line number Diff line number Diff line change
@@ -139,6 +139,8 @@ func (c *Container) Refresh() {
}

// Remove updates the contents of this container to no longer include the specified object.
// This method is not intended to be used inside a loop, to remove all the elements.
// It is much more efficient to just set .Objects to nil instead.
func (c *Container) Remove(rem CanvasObject) {
if len(c.Objects) == 0 {
return
@@ -149,10 +151,11 @@ func (c *Container) Remove(rem CanvasObject) {
continue
}

copy(c.Objects[i:], c.Objects[i+1:])
c.Objects[len(c.Objects)-1] = nil
c.Objects = c.Objects[:len(c.Objects)-1]
removed := make([]CanvasObject, len(c.Objects)-1)
copy(removed, c.Objects[:i])
copy(removed[i:], c.Objects[i+1:])

c.Objects = removed
c.layout()
return
}
1 change: 1 addition & 0 deletions dialog/file.go
Original file line number Diff line number Diff line change
@@ -594,6 +594,7 @@ func (f *FileDialog) Hide() {

// SetDismissText allows custom text to be set in the confirmation button
func (f *FileDialog) SetDismissText(label string) {
f.dismissText = label
if f.dialog == nil {
return
}
4 changes: 4 additions & 0 deletions dialog/file_test.go
Original file line number Diff line number Diff line change
@@ -431,6 +431,7 @@ func TestView(t *testing.T) {
assert.Nil(t, reader)
}, win)

dlg.SetDismissText("Dismiss")
dlg.Show()

popup := win.Canvas().Overlays().Top().(*widget.PopUp)
@@ -470,6 +471,9 @@ func TestView(t *testing.T) {
// toggleViewButton should reflect to what it will do (change to a list view).
assert.Equal(t, "", toggleViewButton.Text)
assert.Equal(t, theme.ListIcon(), toggleViewButton.Icon)

dismiss := ui.Objects[2].(*fyne.Container).Objects[0].(*fyne.Container).Objects[0].(*widget.Button)
assert.Equal(t, "Dismiss", dismiss.Text)
}

func TestFileFavorites(t *testing.T) {
29 changes: 12 additions & 17 deletions internal/driver/glfw/window.go
Original file line number Diff line number Diff line change
@@ -218,7 +218,6 @@ func (w *window) FixedSize() bool {

func (w *window) SetFixedSize(fixed bool) {
w.fixedSize = fixed
w.ensureFixedHasSize()
if w.view() != nil {
w.runOnMainWhenCreated(w.fitContent)
}
@@ -315,7 +314,12 @@ func (w *window) fitContent() {
w.viewLock.Unlock()
}
if w.fixedSize {
w.shouldWidth, w.shouldHeight = w.requestedWidth, w.requestedHeight
if w.shouldWidth > w.requestedWidth {
w.requestedWidth = w.shouldWidth
}
if w.shouldHeight > w.requestedHeight {
w.requestedHeight = w.shouldHeight
}
view.SetSizeLimits(w.requestedWidth, w.requestedHeight, w.requestedWidth, w.requestedHeight)
} else {
view.SetSizeLimits(minWidth, minHeight, glfw.DontCare, glfw.DontCare)
@@ -501,9 +505,6 @@ func (w *window) SetContent(content fyne.CanvasObject) {
}

w.canvas.SetContent(content)
if !visible {
w.ensureFixedHasSize()
}

// show new canvas element
if content != nil {
@@ -539,14 +540,6 @@ func (w *window) destroy(d *gLDriver) {
}
}

// ensureFixedHasSize makes sure that if a window is fixed size it has a requested size, or is set to minimum
func (w *window) ensureFixedHasSize() {
if w.FixedSize() && (w.requestedWidth == 0 || w.requestedHeight == 0) {
bigEnough := w.canvas.canvasSize(w.canvas.Content().MinSize())
w.Resize(bigEnough)
}
}

func (w *window) moved(_ *glfw.Window, x, y int) {
if !w.fullScreen { // don't save the move to top left when changing to fullscreen
// save coordinates
@@ -1502,11 +1495,13 @@ func (w *window) create() {
fn()
}

w.requestedWidth, w.requestedHeight = w.width, w.height

if w.fixedSize { // as the window will not be sized later we may need to pack menus etc
w.canvas.Resize(w.canvas.Size())
if w.FixedSize() && (w.requestedWidth == 0 || w.requestedHeight == 0) {
bigEnough := w.canvas.canvasSize(w.canvas.Content().MinSize())
w.width, w.height = internal.ScaleInt(w.canvas, bigEnough.Width), internal.ScaleInt(w.canvas, bigEnough.Height)
w.shouldWidth, w.shouldHeight = w.width, w.height
}

w.requestedWidth, w.requestedHeight = w.width, w.height
// order of operation matters so we do these last items in order
w.viewport.SetSize(w.shouldWidth, w.shouldHeight) // ensure we requested latest size
})
2 changes: 1 addition & 1 deletion internal/driver/mobile/file_ios.go
Original file line number Diff line number Diff line change
@@ -95,7 +95,7 @@ func (s *secureWriteCloser) Close() error {

func existsURI(u fyne.URI) (bool, error) {
if u.Scheme() != "file" {
return true, errors.New("cannot check existance of " + u.Scheme() + " on iOS")
return true, errors.New("cannot check existence of " + u.Scheme() + " on iOS")
}

cStr := C.CString(u.Path())
2 changes: 2 additions & 0 deletions widget/form.go
Original file line number Diff line number Diff line change
@@ -271,6 +271,8 @@ func (f *Form) updateLabels() {
} else {
l.Color = theme.ForegroundColor()
}
} else {
l.Color = theme.ForegroundColor()
}

l.Text = item.Text
2 changes: 1 addition & 1 deletion widget/form_test.go
Original file line number Diff line number Diff line change
@@ -132,7 +132,7 @@ func TestForm_ChangeTheme(t *testing.T) {
form := &Form{
Items: []*FormItem{
{Text: "test1", Widget: NewEntry()},
{Text: "test2", Widget: NewEntry()},
{Text: "test2", Widget: NewLabel("static")},
},
OnSubmit: func() {}, OnCancel: func() {}}
w := test.NewWindow(form)
Binary file modified widget/testdata/form/theme_changed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified widget/testdata/form/theme_initial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.