theme.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package config
  2. type (
  3. GuildsTreeTheme struct {
  4. // Graphics indicates whether to draw the line graphics to illustrate the hierarchy or not.
  5. Graphics bool `yaml:"graphics"`
  6. }
  7. MessagesTextTheme struct {
  8. AuthorColor string `yaml:"author_color"`
  9. }
  10. MessageInputTheme struct{}
  11. )
  12. type Theme struct {
  13. Border bool `yaml:"border"`
  14. BorderColor string `yaml:"border_color"`
  15. BorderPadding [4]int `yaml:"border_padding,flow"`
  16. TitleColor string `yaml:"title_color"`
  17. BackgroundColor string `yaml:"background_color"`
  18. GuildsTree GuildsTreeTheme `yaml:"guilds_tree"`
  19. MessagesText MessagesTextTheme `yaml:"messages_text"`
  20. MessageInput MessageInputTheme `yaml:"message_input"`
  21. }
  22. func defTheme() Theme {
  23. return Theme{
  24. Border: true,
  25. BorderColor: "default",
  26. BorderPadding: [...]int{0, 0, 1, 1},
  27. TitleColor: "default",
  28. BackgroundColor: "default",
  29. GuildsTree: GuildsTreeTheme{
  30. Graphics: true,
  31. },
  32. MessagesText: MessagesTextTheme{
  33. AuthorColor: "aqua",
  34. },
  35. MessageInput: MessageInputTheme{},
  36. }
  37. }