diff --git a/aluminum/plugin.go b/aluminum/plugin.go index d6ce361..030491c 100644 --- a/aluminum/plugin.go +++ b/aluminum/plugin.go @@ -5,7 +5,7 @@ import "git.tebibyte.media/tomo/aluminum" import "git.tebibyte.media/tomo/tomo/theme" func init () { - theme.SetTheme(aluminum.Theme { }) + theme.SetTheme(new(aluminum.Theme)) } func Name () string { diff --git a/theme.go b/theme.go index da5761e..fa9ec70 100644 --- a/theme.go +++ b/theme.go @@ -4,6 +4,7 @@ import "image" import "image/color" import "git.tebibyte.media/tomo/tomo" import "golang.org/x/image/font/basicfont" +import "git.tebibyte.media/tomo/tomo/data" import "git.tebibyte.media/tomo/tomo/theme" import "git.tebibyte.media/tomo/tomo/input" import "git.tebibyte.media/tomo/tomo/event" @@ -46,7 +47,7 @@ var gutterColorHovered = hex(0xc5cbd6FF) type Theme struct { } -func (Theme) RGBA (id theme.Color) (r, g, b, a uint32) { +func (this *Theme) RGBA (id theme.Color) (r, g, b, a uint32) { switch id { case theme.ColorBackground: return backgroundColor .RGBA() case theme.ColorForeground: return textColor .RGBA() @@ -57,7 +58,7 @@ func (Theme) RGBA (id theme.Color) (r, g, b, a uint32) { } } -func (Theme) Apply (object tomo.Object, role theme.Role) event.Cookie { +func (this *Theme) Apply (object tomo.Object, role theme.Role) event.Cookie { box := object.GetBox() box.SetColor(backgroundColor) @@ -216,3 +217,25 @@ func (Theme) Apply (object tomo.Object, role theme.Role) event.Cookie { } return event.MultiCookie() } + +func (this *Theme) Icon (theme.Icon, theme.IconSize) tomo.Texture { + this.ensure() + // TODO + return nil +} + +func (this *Theme) MimeIcon (data.Mime, theme.IconSize) tomo.Texture { + this.ensure() + // TODO + return nil +} + +func (this *Theme) ApplicationIcon (theme.ApplicationIcon, theme.IconSize) tomo.Texture { + this.ensure() + // TODO + return nil +} + +func (this *Theme) ensure () { + // TODO +}