How to make a colored background in fyne? I can use a rectangle in container.NewMax, but I don't think that's the right approach. maybe there is some way to change the background of the container?
If I use the rectangle approach in container.NewMax , then I don't know how I should position the other elements so that my container.NewMax stays in the background and completely covers the window.
background := canvas.NewRectangle(color.RGBA{R: 205, G: 92, B: 92, A: 255})
container.NewMax(background)
btn := widget.NewButton("test", func() {})
Using rect is correct, MaxLayout takes full space of parent. So you could use like container.NewMax(background, container.NewHBox(btn))