feat: add graphics field to config

This commit is contained in:
ayntgl 2021-10-23 14:19:01 +04:00
parent 18b94450e2
commit 1a6ce2e42f
2 changed files with 12 additions and 6 deletions

View file

@ -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",

View file

@ -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)