package wintergreen import "git.tebibyte.media/tomo/tomo" import "golang.org/x/image/font/basicfont" import "git.tebibyte.media/tomo/tomo/theme" var colorFocus = color.RGBA { R: 61, G: 128, B: 143, A: 255 } var colorInput = color.RGBA { R: 208, G: 203, B: 150, A: 255 } var colorCarved = color.RGBA { R: 169, G: 171, B: 168, A: 255 } var colorBackground = color.RGBA { R: 169, G: 171, B: 168, A: 255 } var colorForeground = color.Black var colorOutline = color.Black var outline = tomo.Border { Width: tomo.I(1), Color: [4]color.Color { colorOutline, colorOutline, colorOutline, colorOutline, }, } type Theme struct { } func (Theme) Apply (object tomo.Object, role theme.Role) { if textBox, ok := object.(tomo.TextBox); ok { textBox.SetDotColor(colorFocus) textBox.SetTextColor(colorForeground) } switch role.Object { case "Button": object.SetColor(colorCarved) case "Input": object.SetColor(colorInput) default: object.SetColor(colorBackground) } }