Skip to content

Commit e332a5e

Browse files
committed
Merge branch 'release/v2.4.x'
2 parents 0ace386 + 9073c1b commit e332a5e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+610
-245
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,27 @@
33
This file lists the main changes with each version of the Fyne toolkit.
44
More detailed release notes can be found on the [releases page](https://github.com/fyne-io/fyne/releases).
55

6+
## 2.4.4 - 13 February 2024
7+
8+
### Fixed
9+
10+
* Spaces could be appended to linux Exec command during packaging
11+
* Secondary mobile windows would not size correctly when padded
12+
* Setting Icon.Resource to nil will not clear rendering
13+
* Dismiss iOS keyboard if "Done" is tapped
14+
* Large speed improvement in Entry and GridWrap widgets
15+
* tests fail with macOS Assertion failure in NSMenu (#4572)
16+
* Fix image test failures on Apple Silicon
17+
* High CPU use when showing CustomDialogs (#4574)
18+
* Entry does not show the last (few) changes when updating a binding.String in a fast succession (#4082)
19+
* Calling Entry.SetText and then Entry.Bind immediately will ignore the bound value (#4235)
20+
* Changing theme while application is running doesn't change some parameters on some widgets (#4344)
21+
* Check widget: hovering/tapping to the right of the label area should not activate widget (#4527)
22+
* Calling entry.SetPlaceHolder inside of OnChanged callback freezes app (#4516)
23+
* Hyperlink enhancement: underline and tappable area shouldn't be wider than the text label (#3528)
24+
* Fix possible compile error from go-text/typesetting
25+
26+
627
## 2.4.3 - 23 December 2023
728

829
### Fixed

cmd/fyne/internal/templates/bundled.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/fyne/internal/templates/data/app.desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Type=Application
33
Name={{.Name}}
44
{{- if ne .GenericName ""}}
55
GenericName={{.GenericName}}{{end}}
6-
Exec={{.Exec}} {{.ExecParams}}
6+
Exec={{.Exec}} {{- .ExecParams}}
77
Icon={{.Name}}
88
{{- if ne .Comment ""}}
99
Comment={{.Comment}}{{end}}

container.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ func (c *Container) Refresh() {
129129
// This method is not intended to be used inside a loop, to remove all the elements.
130130
// It is much more efficient to call RemoveAll() instead.
131131
func (c *Container) Remove(rem CanvasObject) {
132+
c.lock.Lock()
133+
defer c.lock.Unlock()
132134
if len(c.Objects) == 0 {
133135
return
134136
}
135137

136-
c.lock.Lock()
137-
defer c.lock.Unlock()
138138
for i, o := range c.Objects {
139139
if o != rem {
140140
continue

container/apptabs.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ func (t *AppTabs) CreateRenderer() fyne.WidgetRenderer {
5757
appTabs: t,
5858
}
5959
r.action = r.buildOverflowTabsButton()
60+
r.tabs = t
6061

6162
// Initially setup the tab bar to only show one tab, all others will be in overflow.
6263
// When the widget is laid out, and we know the size, the tab bar will be updated to show as many as can fit.

container/doctabs.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ func (t *DocTabs) CreateRenderer() fyne.WidgetRenderer {
6767
}
6868
r.action = r.buildAllTabsButton()
6969
r.create = r.buildCreateTabsButton()
70+
r.tabs = t
71+
7072
r.box = NewHBox(r.create, r.action)
7173
r.scroller.OnScrolled = func(offset fyne.Position) {
7274
r.updateIndicator(false)

container/tabs.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ type baseTabsRenderer struct {
292292
action *widget.Button
293293
bar *fyne.Container
294294
divider, indicator *canvas.Rectangle
295+
296+
tabs baseTabs
295297
}
296298

297299
func (r *baseTabsRenderer) Destroy() {
@@ -304,6 +306,10 @@ func (r *baseTabsRenderer) applyTheme(t baseTabs) {
304306
r.divider.FillColor = theme.ShadowColor()
305307
r.indicator.FillColor = theme.PrimaryColor()
306308
r.indicator.CornerRadius = theme.SelectionRadiusSize()
309+
310+
for _, tab := range r.tabs.items() {
311+
tab.Content.Refresh()
312+
}
307313
}
308314

309315
func (r *baseTabsRenderer) layout(t baseTabs, size fyne.Size) {

container/tabs_test.go

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@ package container
33
import (
44
"testing"
55

6+
"github.com/stretchr/testify/assert"
7+
8+
"fyne.io/fyne/v2"
69
"fyne.io/fyne/v2/canvas"
710
"fyne.io/fyne/v2/internal/cache"
11+
"fyne.io/fyne/v2/test"
812
"fyne.io/fyne/v2/theme"
9-
"github.com/stretchr/testify/assert"
13+
"fyne.io/fyne/v2/widget"
1014
)
1115

1216
func TestTabButton_Icon_Change(t *testing.T) {
@@ -19,3 +23,26 @@ func TestTabButton_Icon_Change(t *testing.T) {
1923
b.Refresh()
2024
assert.NotEqual(t, oldResource, icon.Resource)
2125
}
26+
27+
func TestTab_ThemeChange(t *testing.T) {
28+
a := test.NewApp()
29+
defer test.NewApp()
30+
a.Settings().SetTheme(theme.LightTheme())
31+
32+
tabs := NewAppTabs(
33+
NewTabItem("a", widget.NewLabel("a")),
34+
NewTabItem("b", widget.NewLabel("b")))
35+
w := test.NewWindow(tabs)
36+
w.Resize(fyne.NewSize(180, 120))
37+
38+
initial := w.Canvas().Capture()
39+
40+
a.Settings().SetTheme(theme.DarkTheme())
41+
tabs.SelectIndex(1)
42+
second := w.Canvas().Capture()
43+
assert.NotEqual(t, initial, second)
44+
45+
a.Settings().SetTheme(theme.LightTheme())
46+
tabs.SelectIndex(0)
47+
assert.Equal(t, initial, w.Canvas().Capture())
48+
}

dialog/base.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"fyne.io/fyne/v2/canvas"
99
"fyne.io/fyne/v2/container"
1010
col "fyne.io/fyne/v2/internal/color"
11+
"fyne.io/fyne/v2/layout"
1112
"fyne.io/fyne/v2/theme"
1213
"fyne.io/fyne/v2/widget"
1314
)
@@ -108,8 +109,15 @@ func (d *dialog) hideWithResponse(resp bool) {
108109
func (d *dialog) create(buttons fyne.CanvasObject) {
109110
label := widget.NewLabelWithStyle(d.title, fyne.TextAlignLeading, fyne.TextStyle{Bold: true})
110111

112+
var image fyne.CanvasObject
113+
if d.icon != nil {
114+
image = &canvas.Image{Resource: d.icon}
115+
} else {
116+
image = &layout.Spacer{}
117+
}
118+
111119
content := container.New(&dialogLayout{d: d},
112-
&canvas.Image{Resource: d.icon},
120+
image,
113121
newThemedBackground(),
114122
d.content,
115123
buttons,

dialog/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ func (f *FileDialog) SetDismissText(label string) {
689689
f.dialog.win.Refresh()
690690
}
691691

692-
// SetLocation tells this FileDirectory which location to display.
692+
// SetLocation tells this FileDialog which location to display.
693693
// This is normally called before the dialog is shown.
694694
//
695695
// Since: 1.4

0 commit comments

Comments
 (0)