~chrisppy/titan

723d8c78cdfebe669e51d6e5396c78b05941aabc — Chris Palmer 2 months ago 675e443
set tab colors based on content and title colors
2 files changed, 9 insertions(+), 0 deletions(-)

M browser.go
M ui.go
M browser.go => browser.go +5 -0
@@ 28,6 28,11 @@ func (a *app) loadBrowserPanel(links []string) {
	a.UI.BrowserPanel.TabNames = make([]string, 0)

	a.UI.BrowserPanel.TabbedPanels = cview.NewTabbedPanels()
	a.UI.BrowserPanel.TabbedPanels.SetTabBackgroundColor(a.Config.Theme.ContentBGColor)
	a.UI.BrowserPanel.TabbedPanels.SetTabTextColor(a.Config.Theme.ContentTextColor)
	a.UI.BrowserPanel.TabbedPanels.SetTabBackgroundColorFocused(a.Config.Theme.TitleBGColor)
	a.UI.BrowserPanel.TabbedPanels.SetTabTextColorFocused(a.Config.Theme.TitleFGColor)
	a.UI.BrowserPanel.TabbedPanels.SetTabSwitcherDivider("", "", "")

	a.UI.BrowserPanel.View = cview.NewFlex()
	a.UI.BrowserPanel.View.SetDirection(cview.FlexColumn)

M ui.go => ui.go +4 -0
@@ 100,6 100,10 @@ func (a *app) loadUI(links []string) {
		Panels:      cview.NewPanels(),
	}

	cview.Styles.ScrollBarColor = a.Config.Theme.TitleBGColor
	cview.Styles.PrimaryTextColor = a.Config.Theme.ContentTextColor
	cview.Styles.PrimitiveBackgroundColor = a.Config.Theme.ContentBGColor

	a.addBindings()
	a.UI.Application.SetInputCapture(a.UI.Bindings.Capture)