Fix list not drawing background

This commit is contained in:
Sasha Koshka 2023-02-26 22:56:20 -05:00
parent 26787d8670
commit 449922851f
3 changed files with 4 additions and 3 deletions

View File

@ -52,7 +52,8 @@ func DrawShatter (
) ( ) (
updatedRegion image.Rectangle, updatedRegion image.Rectangle,
) { ) {
return Draw(destination, source, shatter.Shatter(destination.Bounds(), rocks...)...) tiles := shatter.Shatter(destination.Bounds(), rocks...)
return Draw(destination, source, tiles...)
} }
// AllocateSample returns a new canvas containing the result of a pattern. The // AllocateSample returns a new canvas containing the result of a pattern. The

View File

@ -461,5 +461,5 @@ func (element *List) draw () {
).Add(innerBounds.Min).Intersect(innerBounds) ).Add(innerBounds.Min).Intersect(innerBounds)
pattern := element.theme.Pattern(theme.PatternSunken, state) pattern := element.theme.Pattern(theme.PatternSunken, state)
artist.DrawShatter ( artist.DrawShatter (
element.core, pattern, bounds, covered) element.core, pattern, covered)
} }

View File

@ -76,7 +76,7 @@ func (entry *ListEntry) Draw (
return entry.drawer.Draw ( return entry.drawer.Draw (
destination, destination,
foreground, foreground,
offset.Add(image.Pt(padding[3], padding[0])). offset.Add(image.Pt(padding[artist.SideLeft], padding[artist.SideTop])).
Sub(entry.drawer.LayoutBounds().Min)) Sub(entry.drawer.LayoutBounds().Min))
} }