mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-20 23:24:18 +02:00
More contrasty note titles in pager status bar
This commit is contained in:
parent
1219d22834
commit
f3021822f3
2 changed files with 9 additions and 7 deletions
14
ui/pager.go
14
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
|
||||
|
|
|
|||
2
ui/ui.go
2
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue