Skip to content

Commit

Permalink
Only capture the canvas size. Nothing more
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Nov 2, 2020
1 parent e17a371 commit a5df8f1
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions internal/painter/software/painter.go
Expand Up @@ -25,8 +25,7 @@ func NewPainter() *Painter {
func (*Painter) Paint(c fyne.Canvas) image.Image {
theme := fyne.CurrentApp().Settings().Theme()

size := c.Size().Max(c.Content().MinSize())
bounds := image.Rect(0, 0, internal.ScaleInt(c, size.Width), internal.ScaleInt(c, size.Height))
bounds := image.Rect(0, 0, internal.ScaleInt(c, c.Size().Width), internal.ScaleInt(c, c.Size().Height))
base := image.NewNRGBA(bounds)
draw.Draw(base, bounds, image.NewUniform(theme.BackgroundColor()), image.Point{}, draw.Src)

Expand Down
2 changes: 1 addition & 1 deletion widget/form_test.go
Expand Up @@ -122,7 +122,7 @@ func TestForm_ChangeTheme(t *testing.T) {
},
OnSubmit: func() {}, OnCancel: func() {}}
w := test.NewWindow(form)
w.Resize(fyne.NewSize(300, 200))
w.Resize(fyne.NewSize(340, 240))
defer w.Close()

test.AssertImageMatches(t, "form/theme_initial.png", w.Canvas().Capture())
Expand Down
Binary file modified widget/testdata/entry/placeholder_initial.png
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/entry/wrap_multi_line_off.png
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/entry/wrap_single_line_off.png
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_changed.png
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
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/list/list_theme_changed.png
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/tree/theme_changed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a5df8f1

Please sign in to comment.