Skip to content

Commit

Permalink
Avoid some code duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed May 23, 2024
1 parent 73ede97 commit 7cf3083
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/testwindow.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ type testWindow struct {
//
// Since: 2.5
func NewTempWindow(t testing.TB, content fyne.CanvasObject) fyne.Window {
window := fyne.CurrentApp().NewWindow("")
window.SetContent(content)
window := NewWindow(content)
t.Cleanup(window.Close)
return window
}
Expand Down

0 comments on commit 7cf3083

Please sign in to comment.