Initialize a new view after assigning styles
This commit is contained in:
parent
47579463cd
commit
22a95683d2
1 changed files with 3 additions and 2 deletions
|
|
@ -56,12 +56,13 @@ func NewApplication(cfg *config.Config) *Application {
|
|||
app.EnableMouse(app.config.Mouse)
|
||||
app.SetBeforeDrawFunc(app.onBeforeDraw)
|
||||
|
||||
app.view = newView(app)
|
||||
|
||||
// The styles must be assigned before initializing a new view.
|
||||
tview.Styles.PrimitiveBackgroundColor = tcell.GetColor(cfg.Theme.Background)
|
||||
tview.Styles.BorderColor = tcell.GetColor(cfg.Theme.Border)
|
||||
tview.Styles.TitleColor = tcell.GetColor(cfg.Theme.Title)
|
||||
|
||||
app.view = newView(app)
|
||||
|
||||
return app
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue