Skip to content

Commit 2d10fb8

Browse files
committed
Adjust news header syle
1 parent 537ef30 commit 2d10fb8

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

ui/pager.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ var (
3636
statusBarBg = common.NewColorPair("#242424", "#E6E6E6")
3737

3838
// Styling funcs
39-
statusBarScrollPosStyle = newStyle(common.NewColorPair("#5A5A5A", "#949494"), statusBarBg)
40-
statusBarNoteStyle = newStyle(statusBarNoteFg, statusBarBg)
41-
statusBarHelpStyle = newStyle(statusBarNoteFg, common.NewColorPair("#323232", "#DCDCDC"))
42-
statusBarStashDotStyle = newStyle(common.Green, statusBarBg)
43-
statusBarMessageStyle = newStyle(mintGreen, darkGreen)
44-
statusBarMessageStashIconStyle = newStyle(mintGreen, darkGreen)
45-
statusBarMessageScrollPosStyle = newStyle(mintGreen, darkGreen)
46-
statusBarMessageHelpStyle = newStyle(common.NewColorPair("#B6FFE4", "#B6FFE4"), common.Green)
47-
helpViewStyle = newStyle(statusBarNoteFg, common.NewColorPair("#1B1B1B", "#f2f2f2"))
39+
statusBarScrollPosStyle = newStyle(common.NewColorPair("#5A5A5A", "#949494"), statusBarBg, false)
40+
statusBarNoteStyle = newStyle(statusBarNoteFg, statusBarBg, false)
41+
statusBarHelpStyle = newStyle(statusBarNoteFg, common.NewColorPair("#323232", "#DCDCDC"), false)
42+
statusBarStashDotStyle = newStyle(common.Green, statusBarBg, false)
43+
statusBarMessageStyle = newStyle(mintGreen, darkGreen, false)
44+
statusBarMessageStashIconStyle = newStyle(mintGreen, darkGreen, false)
45+
statusBarMessageScrollPosStyle = newStyle(mintGreen, darkGreen, false)
46+
statusBarMessageHelpStyle = newStyle(common.NewColorPair("#B6FFE4", "#B6FFE4"), common.Green, false)
47+
helpViewStyle = newStyle(statusBarNoteFg, common.NewColorPair("#1B1B1B", "#f2f2f2"), false)
4848
)
4949

5050
type contentRenderedMsg string

ui/stash.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ func stashView(m stashModel) string {
880880
if m.state == stashStateFilterNotes || m.state == stashStateShowFiltered {
881881
logoOrFilter = m.filterInput.View()
882882
} else if m.state == stashStateShowNews {
883-
logoOrFilter = glowLogoView(" Newsfeed ")
883+
logoOrFilter += newsTitleStyle(" News ")
884884
}
885885

886886
var pagination string

ui/styles.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,21 @@ var (
4040
dullYellowFg = newFgStyle(common.NewColorPair("#9BA92F", "#6BCB94")) // renders light green on light backgrounds
4141
redFg = newFgStyle(common.Red)
4242
faintRedFg = newFgStyle(common.FaintRed)
43+
44+
newsTitleStyle = newStyle(
45+
common.NewColorPair(common.Indigo.String(), common.Cream.String()),
46+
common.NewColorPair(common.Cream.String(), common.Indigo.String()),
47+
true,
48+
)
4349
)
4450

4551
// Returns a termenv style with foreground and background options.
46-
func newStyle(fg, bg common.ColorPair) func(string) string {
47-
return te.Style{}.Foreground(fg.Color()).Background(bg.Color()).Styled
52+
func newStyle(fg, bg common.ColorPair, bold bool) func(string) string {
53+
s := te.Style{}.Foreground(fg.Color()).Background(bg.Color())
54+
if bold {
55+
s = s.Bold()
56+
}
57+
return s.Styled
4858
}
4959

5060
// Returns a new termenv style with background options only.

0 commit comments

Comments
 (0)