Skip to content

Commit

Permalink
Don't add 0 when not padding
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed May 23, 2024
1 parent 009cf17 commit 1c75e6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/testcanvas.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ func (c *testCanvas) SetContent(content fyne.CanvasObject) {
return
}

padding := fyne.NewSize(0, 0)
minSize := content.MinSize()
if c.padded {
padding = fyne.NewSquareSize(theme.Padding() * 2)
minSize = minSize.Add(fyne.NewSquareSize(theme.Padding() * 2))
}
c.Resize(content.MinSize().Add(padding))
c.Resize(minSize)
}

func (c *testCanvas) SetOnTypedKey(handler func(*fyne.KeyEvent)) {
Expand Down

0 comments on commit 1c75e6b

Please sign in to comment.