From 7d2afe1ca176d0eb76f65523ed7ebcbca702d0c1 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Thu, 16 Jan 2025 00:20:12 -0500 Subject: Central UI (#26) * migrate to urfave/cli V3 * Remove slider background * Force the use of TrueColor everywhere * All ui info in one location * Fix BinaryFill Example * Make unfocused tabs more faint * Fix color input width * Ctrl-c overrides color input and quits termpicker * docs: remove redundant comment * fix: refactor picker View() --- internal/ui/misc.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 internal/ui/misc.go (limited to 'internal/ui/misc.go') 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) +} -- cgit v1.2.3