Checklist
Describe the bug
While trying to fix my pull request #6234, I noticed that a call to obj.MinSize() breaks TestRender (in driver/software/render_test.go:17). This isn't an issue in any real app but it surprises me and might be an indicator that something is broken. (Or maybe the test is wrong.)
How to reproduce
- Apply this patch:
diff --git a/driver/software/render.go b/driver/software/render.go
index 2a22d43db..3fb6d3f57 100644
--- a/driver/software/render.go
+++ b/driver/software/render.go
@@ -27,5 +27,6 @@ func Render(obj fyne.CanvasObject, t fyne.Theme) image.Image {
c.SetContent(obj)
app.ApplyThemeTo(obj, c)
+ obj.MinSize() // this breaks TestRender
return c.Capture()
}
- Run:
go test -v -test.run 'TestRender$' ./driver/software
Output:
=== RUN TestRender
util_helper.go:61:
Error Trace: /home/max/repos/my-fyne/internal/test/util_helper.go:61
/home/max/repos/my-fyne/test/test_helper.go:78
/home/max/repos/my-fyne/driver/software/render_test.go:21
Error: Images not equal.
Test: TestRender
Messages: Image did not match master. Actual image written to file:///home/max/repos/my-fyne/driver/software/testdata/failed/label_ugly_theme.png.
--- FAIL: TestRender (0.06s)
FAIL
FAIL fyne.io/fyne/v2/driver/software 0.071s
FAIL
Update: It turns out, this wasn't an issue before my own PR #6231 was merged. Maybe there is just a Refresh call missing somewhere.
Update 2: When I call obj.Refresh() after obj.MinSize() the test passes. I'm not sure if a Refresh call should be required here.
Screenshots
Expected image:

Actual image:

Example code
develop branch plus patch above.
Fyne version
develop
Go compiler version
1.26.1
Operating system and version
Arch Linux
Additional Information
No response
Checklist
Describe the bug
While trying to fix my pull request #6234, I noticed that a call to
obj.MinSize()breaksTestRender(indriver/software/render_test.go:17). This isn't an issue in any real app but it surprises me and might be an indicator that something is broken. (Or maybe the test is wrong.)How to reproduce
go test -v -test.run 'TestRender$' ./driver/softwareOutput:
Update: It turns out, this wasn't an issue before my own PR #6231 was merged. Maybe there is just a
Refreshcall missing somewhere.Update 2: When I call
obj.Refresh()afterobj.MinSize()the test passes. I'm not sure if aRefreshcall should be required here.Screenshots
Expected image:

Actual image:

Example code
develop branch plus patch above.
Fyne version
develop
Go compiler version
1.26.1
Operating system and version
Arch Linux
Additional Information
No response