diff options
-rw-r--r-- | internal/slider/slider.go | 2 | ||||
-rw-r--r-- | internal/ui/misc.go | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/internal/slider/slider.go b/internal/slider/slider.go index 2d47249..a6c6ee6 100644 --- a/internal/slider/slider.go +++ b/internal/slider/slider.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/ChausseBenjamin/termpicker/internal/progress" + "github.com/ChausseBenjamin/termpicker/internal/ui" "github.com/charmbracelet/bubbles/key" tea "github.com/charmbracelet/bubbletea" ) @@ -21,6 +22,7 @@ func New(label byte, maxVal int, opts ...progress.Option) Model { label: label, progress: progress.New( progress.WithoutPercentage(), + progress.WithColorProfile(ui.ColorProfile()), ), max: maxVal, current: maxVal / 2, diff --git a/internal/ui/misc.go b/internal/ui/misc.go new file mode 100644 index 0000000..33092b4 --- /dev/null +++ b/internal/ui/misc.go @@ -0,0 +1,16 @@ +package ui + +import ( + lg "github.com/charmbracelet/lipgloss" + "github.com/muesli/termenv" +) + +func ColorProfile() termenv.Profile { + return termenv.TrueColor +} + +func init() { + r := lg.DefaultRenderer() + r.SetColorProfile(ColorProfile()) + lg.SetDefaultRenderer(r) +} |