Skip to content

Commit

Permalink
update help style, some other colour tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
psethwick committed Feb 12, 2024
1 parent ca68864 commit 37cc66b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 21 deletions.
9 changes: 9 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ func initialModel() *mainModel {
m.chooseModel = newChooseModel(&m, keys.InputKeys)
m.refresh = func() {}
m.helpModel = help.New()
m.helpModel.Styles = help.Styles{
ShortKey: style.HelpKeyStyle,
ShortDesc: style.HelpDescStyle,
ShortSeparator: style.HelpSepStyle,
Ellipsis: style.HelpSepStyle,
FullKey: style.HelpKeyStyle,
FullDesc: style.HelpDescStyle,
FullSeparator: style.HelpSepStyle,
}
m.taskMenuModel = newTaskMenuModel(&m)
m.statusBarModel = status.New()
m.taskList = tasklist.New(func(t string) { m.statusBarModel.SetTitle(t) }, dbg)
Expand Down
30 changes: 10 additions & 20 deletions status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/mistakenelf/teacup/statusbar"

"github.com/psethwick/tuidoist/style"
)

Expand Down Expand Up @@ -38,22 +39,10 @@ func (sb *Model) SetSyncStatus(ss SyncStatus) {
switch ss {
case Synced:
sb.bar.FirstColumn = "✅"
sb.bar.FirstColumnColors = statusbar.ColorConfig{
Foreground: style.White,
Background: style.Pink,
}
case Syncing:
sb.bar.FirstColumn = "🔁"
sb.bar.FirstColumnColors = statusbar.ColorConfig{
Foreground: style.White,
Background: style.Yellow,
}
case Error:
sb.bar.FirstColumn = "❌"
sb.bar.FirstColumnColors = statusbar.ColorConfig{
Foreground: style.White,
Background: style.Red,
}
}
}

Expand Down Expand Up @@ -96,22 +85,23 @@ func (sb *Model) SetNumber(n int) {
}

func New() Model {
bg := style.Gray
sb := statusbar.New(
statusbar.ColorConfig{
Foreground: style.White,
Background: lipgloss.AdaptiveColor{},
Foreground: lipgloss.AdaptiveColor{},
Background: bg,
},
statusbar.ColorConfig{
Foreground: style.White,
Background: lipgloss.AdaptiveColor{},
Foreground: lipgloss.AdaptiveColor{},
Background: bg,
},
statusbar.ColorConfig{
Foreground: style.White,
Background: lipgloss.AdaptiveColor{},
Foreground: lipgloss.AdaptiveColor{},
Background: bg,
},
statusbar.ColorConfig{
Foreground: style.White,
Background: lipgloss.AdaptiveColor{},
Foreground: lipgloss.AdaptiveColor{},
Background: bg,
},
)
m := Model{
Expand Down
17 changes: 16 additions & 1 deletion style/style.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var (
Yellow = lipgloss.AdaptiveColor{Dark: "#daa520", Light: "#daa520"}
Red = lipgloss.AdaptiveColor{Dark: "#ff0000", Light: "#ff0000"}
Pink = lipgloss.AdaptiveColor{Light: "#F26D94", Dark: "#F25D94"}
Gray = lipgloss.AdaptiveColor{Light: "#8E6F8C", Dark: "#C0A7BF"}
Gray = lipgloss.AdaptiveColor{Light: "#DCC3DB", Dark: "#958194"}

DialogTitle = lipgloss.NewStyle().Width(50).Align(lipgloss.Center)
DialogBox = lipgloss.NewStyle().
Expand All @@ -35,4 +35,19 @@ var (
Underline = lipgloss.NewStyle().Underline(false)
StrikeThrough = lipgloss.NewStyle().Strikethrough(true)
Selected = lipgloss.NewStyle().Border(lipgloss.NormalBorder(), false, true)

HelpKeyStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{
Light: "#8D788B",
Dark: "#7C7B7C",
})

HelpDescStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{
Light: "#B29DB0",
Dark: "#605A5E",
})

HelpSepStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{
Light: "#DCC3DB",
Dark: "#50494F",
})
)

0 comments on commit 37cc66b

Please sign in to comment.