Add background color to ThemeConfig
This commit is contained in:
parent
95df8371e9
commit
087e4391ed
4 changed files with 12 additions and 4 deletions
|
|
@ -36,7 +36,8 @@ type (
|
|||
Border bool `yaml:"border"`
|
||||
BorderPadding [4]int `yaml:"border_padding,flow"`
|
||||
|
||||
TitleColor string `yaml:"title_color"`
|
||||
TitleColor string `yaml:"title_color"`
|
||||
BackgroundColor string `yaml:"background_color"`
|
||||
}
|
||||
|
||||
GuildsTreeThemeConfig struct {
|
||||
|
|
@ -83,7 +84,8 @@ func newConfig() (*Config, error) {
|
|||
Border: true,
|
||||
BorderPadding: [...]int{0, 0, 1, 1},
|
||||
|
||||
TitleColor: "default",
|
||||
TitleColor: "default",
|
||||
BackgroundColor: "default",
|
||||
}
|
||||
|
||||
commonKeys := CommonKeysConfig{
|
||||
|
|
|
|||
|
|
@ -29,8 +29,10 @@ func newGuildsTree() *GuildsTree {
|
|||
gt.SetTopLevel(1)
|
||||
gt.SetSelectedFunc(gt.onSelected)
|
||||
|
||||
gt.SetBackgroundColor(tcell.GetColor(cfg.Theme.GuildsTree.BackgroundColor))
|
||||
|
||||
gt.SetTitle("Guilds")
|
||||
gt.SetTitleColor(tcell.GetColor(cfg.Theme.MessagesText.TitleColor))
|
||||
gt.SetTitleColor(tcell.GetColor(cfg.Theme.GuildsTree.TitleColor))
|
||||
gt.SetTitleAlign(tview.AlignLeft)
|
||||
|
||||
padding := cfg.Theme.GuildsTree.BorderPadding
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ func newMessageInput() *MessageInput {
|
|||
mi.SetFieldBackgroundColor(tview.Styles.PrimitiveBackgroundColor)
|
||||
mi.SetInputCapture(mi.onInputCapture)
|
||||
|
||||
mi.SetTitleColor(tcell.GetColor(cfg.Theme.MessagesText.TitleColor))
|
||||
mi.SetBackgroundColor(tcell.GetColor(cfg.Theme.MessageInput.BackgroundColor))
|
||||
|
||||
mi.SetTitleColor(tcell.GetColor(cfg.Theme.MessageInput.TitleColor))
|
||||
mi.SetTitleAlign(tview.AlignLeft)
|
||||
|
||||
padding := cfg.Theme.MessageInput.BorderPadding
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ func newMessagesText() *MessagesText {
|
|||
mt.SetHighlightedFunc(mt.onHighlighted)
|
||||
mt.SetInputCapture(mt.onInputCapture)
|
||||
|
||||
mt.SetBackgroundColor(tcell.GetColor(cfg.Theme.MessagesText.BackgroundColor))
|
||||
|
||||
mt.SetTitle("Messages")
|
||||
mt.SetTitleColor(tcell.GetColor(cfg.Theme.MessagesText.TitleColor))
|
||||
mt.SetTitleAlign(tview.AlignLeft)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue