NewHeader creates a new application header.
()
| 29 | |
| 30 | // NewHeader creates a new application header. |
| 31 | func NewHeader() *Header { |
| 32 | header := tview.NewTextView() |
| 33 | header.SetTextAlign(tview.AlignCenter) |
| 34 | header.SetText("pvetui") |
| 35 | header.SetDynamicColors(true) |
| 36 | header.SetBackgroundColor(theme.Colors.Header) |
| 37 | header.SetTextColor(theme.Colors.HeaderText) |
| 38 | |
| 39 | return &Header{ |
| 40 | TextView: header, |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | // SetApp sets the application reference for UI updates. |
| 45 | func (h *Header) SetApp(app *tview.Application) { |
no test coverage detected