theme.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package config
  2. import "github.com/rivo/tview"
  3. type (
  4. Theme struct {
  5. Border bool `toml:"border"`
  6. BorderColor string `toml:"border_color"`
  7. BorderPadding [4]int `toml:"border_padding"`
  8. TitleColor string `toml:"title_color"`
  9. BackgroundColor string `toml:"background_color"`
  10. GuildsTree GuildsTreeTheme `toml:"guilds_tree"`
  11. MessagesText MessagesTextTheme `toml:"messages_text"`
  12. }
  13. GuildsTreeTheme struct {
  14. AutoExpandFolders bool `toml:"auto_expand_folders"`
  15. Graphics bool `toml:"graphics"`
  16. }
  17. MessagesTextTheme struct {
  18. AuthorColor string `toml:"author_color"`
  19. EmoteColor string `toml:"emote_color"`
  20. ReplyIndicator string `toml:"reply_indicator"`
  21. }
  22. )
  23. func defaultTheme() Theme {
  24. return Theme{
  25. Border: true,
  26. BorderColor: "default",
  27. BorderPadding: [...]int{0, 0, 1, 1},
  28. BackgroundColor: "default",
  29. TitleColor: "default",
  30. GuildsTree: GuildsTreeTheme{
  31. AutoExpandFolders: true,
  32. Graphics: true,
  33. },
  34. MessagesText: MessagesTextTheme{
  35. AuthorColor: "aqua",
  36. EmoteColor: "green",
  37. ReplyIndicator: string(tview.BoxDrawingsLightArcDownAndRight) + " ",
  38. },
  39. }
  40. }