diff --git a/core/render_test.go b/core/render_test.go index 61877f7268..19a96741a3 100644 --- a/core/render_test.go +++ b/core/render_test.go @@ -8,6 +8,7 @@ import ( "testing" "cogentcore.org/core/colors" + "cogentcore.org/core/colors/gradient" "cogentcore.org/core/icons" "cogentcore.org/core/styles" "cogentcore.org/core/styles/units" @@ -209,3 +210,18 @@ func TestRenderGridCenteredFrame(t *testing.T) { }) b.AssertRender(t, "render/grid-centered-frame") } + +// For https://github.com/cogentcore/core/issues/1034 +func TestRenderParentGradient(t *testing.T) { + b := NewBody() + b.Styler(func(s *styles.Style) { + s.Direction = styles.Row + s.Background = gradient.NewLinear().AddStop(colors.White, 0).AddStop(colors.Black, 1) + }) + for range 3 { + NewFrame(b).Styler(func(s *styles.Style) { + s.Min.Set(units.Em(2)) + }) + } + b.AssertRender(t, "render/parent-gradient") +}