From 8702aaac955a6131e7ef7b3827c652b4cd4a7f26 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Wed, 22 Jan 2025 19:16:51 +0200 Subject: Each section in the client (network/frequency/member/chat) now has a different background color, similar to how discord has it --- internal/client/ui/ui.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'internal/client/ui/ui.go') diff --git a/internal/client/ui/ui.go b/internal/client/ui/ui.go index 61bf7bf..12af548 100644 --- a/internal/client/ui/ui.go +++ b/internal/client/ui/ui.go @@ -196,3 +196,24 @@ func getLines(s string) (lines []string, widest int) { func clamp(v, lower, upper int) int { return min(max(v, lower), upper) } + +/* +🭊🭂██🭍🬿 +██████ +🭥🭓██🭞🭚 + +🭠🭘 🭣🭕 + +🭏🬽 🭈🭄 +*/ + +func IconStyle(icon string, iconFg, iconBg, bg lipgloss.Color) lipgloss.Style { + bgStyle := lipgloss.NewStyle().Background(iconBg).Foreground(bg) + top := bgStyle.Render("🭠🭘 🭣🭕") + middle := lipgloss.NewStyle().Width(6).Align(lipgloss.Center). + Background(iconBg).Foreground(iconFg).Render(icon) + bgStyle2 := lipgloss.NewStyle().Foreground(iconBg) + bottom := bgStyle2.Render("🭥🭓██🭞🭚") + combined := lipgloss.JoinVertical(lipgloss.Left, top, middle, bottom) + return lipgloss.NewStyle().SetString(combined) +} -- cgit v1.3.1