theme.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. ReplyIndicator string `toml:"reply_indicator"`
  20. }
  21. )
  22. func defaultTheme() Theme {
  23. return Theme{
  24. Border: true,
  25. BorderColor: "default",
  26. BorderPadding: [...]int{0, 0, 1, 1},
  27. BackgroundColor: "default",
  28. TitleColor: "default",
  29. GuildsTree: GuildsTreeTheme{
  30. AutoExpandFolders: true,
  31. Graphics: true,
  32. },
  33. MessagesText: MessagesTextTheme{
  34. AuthorColor: "aqua",
  35. ReplyIndicator: string(tview.BoxDrawingsLightArcDownAndRight) + " ",
  36. },
  37. }
  38. }