diff --git a/elements/fun/piano.go b/elements/fun/piano.go index 0ff4561..a90ad8e 100644 --- a/elements/fun/piano.go +++ b/elements/fun/piano.go @@ -307,7 +307,7 @@ func (element *Piano) drawFlat ( ) { state.Pressed = pressed pattern := element.theme.Theme.Pattern ( - theme.PatternButton, theme.C("fun", "flatKey"), state) + theme.PatternButton, state, theme.C("fun", "flatKey")) artist.FillRectangle(element, pattern, bounds) } @@ -318,6 +318,6 @@ func (element *Piano) drawSharp ( ) { state.Pressed = pressed pattern := element.theme.Theme.Pattern ( - theme.PatternButton, theme.C("fun", "sharpKey"), state) + theme.PatternButton, state, theme.C("fun", "sharpKey")) artist.FillRectangle(element, pattern, bounds) } diff --git a/theme/default.go b/theme/default.go index 2e5afa8..9afb6f2 100644 --- a/theme/default.go +++ b/theme/default.go @@ -24,7 +24,7 @@ func (Default) FontFace (style FontStyle, size FontSize, c Case) font.Face { } // Icon returns an icon from the default set corresponding to the given name. -func (Default) Icon (string, Case, IconSize) canvas.Image { +func (Default) Icon (string, IconSize, Case) canvas.Image { // TODO return nil } @@ -33,8 +33,8 @@ func (Default) Icon (string, Case, IconSize) canvas.Image { // pattern ID. func (Default) Pattern ( pattern Pattern, - c Case, state PatternState, + c Case, ) artist.Pattern { switch pattern { case PatternAccent: diff --git a/theme/theme.go b/theme/theme.go index 64aef72..afcf2f4 100644 --- a/theme/theme.go +++ b/theme/theme.go @@ -66,7 +66,7 @@ type Theme interface { // Pattern returns an appropriate pattern given a pattern name, case, // and state. - Pattern (Pattern, Case, PatternState) artist.Pattern + Pattern (Pattern, PatternState, Case) artist.Pattern // Inset returns the area on all sides of a given pattern that is not // meant to be drawn on. @@ -101,7 +101,7 @@ func (wrapped Wrapped) Icon (name string, size IconSize) canvas.Image { // Pattern returns an appropriate pattern given a pattern name and state. func (wrapped Wrapped) Pattern (id Pattern, state PatternState) artist.Pattern { real := wrapped.ensure() - return real.Pattern(id, wrapped.Case, state) + return real.Pattern(id, state, wrapped.Case) } // Inset returns the area on all sides of a given pattern that is not meant to