Jelajahi Sumber

feat: add graphics field to config

ayntgl 4 tahun lalu
induk
melakukan
1a6ce2e42f
2 mengubah file dengan 12 tambahan dan 6 penghapusan
  1. 10 6
      config.go
  2. 2 0
      main.go

+ 10 - 6
config.go

@@ -26,10 +26,12 @@ type keybindings struct {
 }
 
 type theme struct {
-	Border     string `toml:"border"`
-	Title      string `toml:"title"`
 	Background string `toml:"background"`
-	Text       string `toml:"text"`
+
+	Border   string `toml:"border"`
+	Title    string `toml:"title"`
+	Graphics string `toml:"graphics"`
+	Text     string `toml:"text"`
 }
 
 type borders struct {
@@ -87,10 +89,12 @@ func loadConfig() *config {
 		c.UserAgent = userAgent
 		c.GetMessagesLimit = 50
 		c.Theme = theme{
-			Border:     "white",
-			Title:      "cyan",
 			Background: "black",
-			Text:       "white",
+
+			Border:   "white",
+			Title:    "white",
+			Graphics: "white",
+			Text:     "white",
 		}
 		c.Keybindings = keybindings{
 			FocusChannelsTree:      "Alt+Left",

+ 2 - 0
main.go

@@ -25,11 +25,13 @@ func main() {
 	conf = loadConfig()
 
 	tview.Borders = conf.Borders
+
 	tview.Styles.PrimitiveBackgroundColor = tcell.GetColor(conf.Theme.Background)
 	tview.Styles.ContrastBackgroundColor = tcell.GetColor(conf.Theme.Background)
 	tview.Styles.MoreContrastBackgroundColor = tcell.GetColor(conf.Theme.Background)
 	tview.Styles.BorderColor = tcell.GetColor(conf.Theme.Border)
 	tview.Styles.TitleColor = tcell.GetColor(conf.Theme.Title)
+	tview.Styles.GraphicsColor = tcell.GetColor(conf.Theme.Graphics)
 	tview.Styles.PrimaryTextColor = tcell.GetColor(conf.Theme.Text)
 	tview.Styles.SecondaryTextColor = tcell.GetColor(conf.Theme.Text)
 	tview.Styles.TertiaryTextColor = tcell.GetColor(conf.Theme.Text)