From f3021822f3ac7a456bc1d4e7ee022683b9466ab2 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Wed, 20 May 2020 16:45:09 -0400 Subject: [PATCH] More contrasty note titles in pager status bar --- ui/pager.go | 14 +++++++++----- ui/ui.go | 2 -- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ui/pager.go b/ui/pager.go index 5cc8789..e8c4256 100644 --- a/ui/pager.go +++ b/ui/pager.go @@ -27,9 +27,13 @@ const ( var ( noteHeading = te.String(noteHeadingText). - Foreground(common.Cream.Color()). - Background(common.Green.Color()). - String() + Foreground(common.Cream.Color()). + Background(common.Green.Color()). + String() + + statusBarBg = common.NewColorPair("#242424", "#E6E6E6") + statusBarNoteFg = common.NewColorPair("#7D7D7D", "#656565") + statusBarScrollPosFg = common.NewColorPair("#5A5A5A", "#949494") ) // MSG @@ -210,7 +214,7 @@ func pagerStatusBarView(m pagerModel) string { scrollPercent := math.Max(0.0, math.Min(1.0, m.viewport.ScrollPercent())) percentText := fmt.Sprintf(" %3.f%% ", scrollPercent*100) percent := te.String(percentText). - Foreground(statusBarFg.Color()). + Foreground(statusBarScrollPosFg.Color()). Background(statusBarBg.Color()). String() @@ -221,7 +225,7 @@ func pagerStatusBarView(m pagerModel) string { } noteText = truncate(" "+noteText+" ", max(0, m.width-len(logoText)-len(percentText))) note := te.String(noteText). - Foreground(statusBarFg.Color()). + Foreground(statusBarNoteFg.Color()). Background(statusBarBg.Color()).String() // Empty space diff --git a/ui/ui.go b/ui/ui.go index 08d1504..82d494f 100644 --- a/ui/ui.go +++ b/ui/ui.go @@ -14,8 +14,6 @@ import ( var ( glowLogoTextColor = common.Color("#ECFD65") - statusBarBg = common.NewColorPair("#242424", "#E6E6E6") - statusBarFg = common.NewColorPair("#5A5A5A", "#949494") ) // NewProgram returns a new Boba program