diff options
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/client/ui/core/banlist/banlist.go | 6 | ||||
| -rw-r--r-- | internal/client/ui/core/frequencylist/frequencylist.go | 10 | ||||
| -rw-r--r-- | internal/client/ui/core/memberlist/memberlist.go | 7 | ||||
| -rw-r--r-- | internal/client/ui/core/signallist/signallist.go | 6 |
4 files changed, 15 insertions, 14 deletions
diff --git a/internal/client/ui/core/banlist/banlist.go b/internal/client/ui/core/banlist/banlist.go index c9b32d5..4a3fccf 100644 --- a/internal/client/ui/core/banlist/banlist.go +++ b/internal/client/ui/core/banlist/banlist.go @@ -59,10 +59,10 @@ func (m Model) Init() tea.Cmd { func (m Model) View() string { memberStyle := lipgloss.NewStyle().Width(m.width-(margin*2)). Background(colors.BackgroundDim). - Margin(0, margin).Padding(0, padding).Align(lipgloss.Left) + Margin(0, margin).Padding(0, padding).Align(lipgloss.Left). + Background(colors.BackgroundDim).MarginBackground(colors.BackgroundDim) backgroundStyle := lipgloss.NewStyle().Background(colors.BackgroundDim) - backgroundWidthStyle := backgroundStyle.Width(m.width) maxMemberWidth := m.width - widthWithoutMember ownerId := state.State.Networks[m.networkId].OwnerID @@ -121,7 +121,7 @@ func (m Model) View() string { Render(memberName) + ellipsisStyle.Render(ellipsis) } - builder.WriteString(backgroundWidthStyle.Render(memberStyle.Render(memberName))) + builder.WriteString(memberStyle.Render(memberName)) builder.WriteString("\n") } diff --git a/internal/client/ui/core/frequencylist/frequencylist.go b/internal/client/ui/core/frequencylist/frequencylist.go index 4cd686a..17992b3 100644 --- a/internal/client/ui/core/frequencylist/frequencylist.go +++ b/internal/client/ui/core/frequencylist/frequencylist.go @@ -71,7 +71,8 @@ func (m Model) View() string { backgroundStyle := lipgloss.NewStyle().Background(colors.BackgroundDim) frequencyStyle := lipgloss.NewStyle(). MaxHeight(1).Width(m.width-(margin*2)). - Margin(0, margin).Padding(0, padding).Align(lipgloss.Left) + Margin(0, margin).Padding(0, padding).Align(lipgloss.Left). + Background(colors.BackgroundDim).MarginBackground(colors.BackgroundDim) maxFrequencyWidth := m.width - widthWithoutFrequency isAdmin := state.State.Members[*networkId][*state.UserID].IsAdmin @@ -86,10 +87,10 @@ func (m Model) View() string { frequencies = frequencies[m.base:upper] for i, frequency := range frequencies { - backgroundStyle := backgroundStyle.Width(m.width) maxFrequencyWidth := maxFrequencyWidth - frequencyStyle := frequencyStyle.Foreground(lipgloss.Color(frequency.HexColor)) + frequencyStyle := frequencyStyle. + Foreground(lipgloss.Color(frequency.HexColor)) if m.index == m.base+i { frequencyStyle = frequencyStyle.Background(colors.BackgroundHighlight) } @@ -114,7 +115,6 @@ func (m Model) View() string { Foreground(colors.White).Render(notifSymbol) builder.WriteString(notifSymbol) frequencyStyle = frequencyStyle.MarginLeft(margin - 1) - backgroundStyle = backgroundStyle.Width(m.width - 1) if pings != 0 { notif = notifs[min(pings, 10)-1] @@ -137,7 +137,7 @@ func (m Model) View() string { Render(frequencyName) frequency := frequencyStyle.Render(symbol + frequencyName + notif) - builder.WriteString(backgroundStyle.Render(frequency)) + builder.WriteString(frequency) builder.WriteString("\n") } diff --git a/internal/client/ui/core/memberlist/memberlist.go b/internal/client/ui/core/memberlist/memberlist.go index 0a934d9..1ed8c5e 100644 --- a/internal/client/ui/core/memberlist/memberlist.go +++ b/internal/client/ui/core/memberlist/memberlist.go @@ -70,8 +70,9 @@ func (m Model) View() string { memberStyle := lipgloss.NewStyle().Width(m.width-(margin*2)). Background(colors.BackgroundDim). - Margin(0, margin).Padding(0, padding).Align(lipgloss.Left) - backgroundWidtStyle := backgroundStyle.Width(m.width) + Margin(0, margin).Padding(0, padding).Align(lipgloss.Left). + Background(colors.BackgroundDim).MarginBackground(colors.BackgroundDim) + maxMemberWidth := m.width - widthWithoutMember ownerId := state.State.Networks[*networkId].OwnerID @@ -130,7 +131,7 @@ func (m Model) View() string { Render(memberName) + ellipsisStyle.Render(ellipsis) } - builder.WriteString(backgroundWidtStyle.Render(memberStyle.Render(memberName))) + builder.WriteString(memberStyle.Render(memberName)) builder.WriteString("\n") } diff --git a/internal/client/ui/core/signallist/signallist.go b/internal/client/ui/core/signallist/signallist.go index a301b32..410cb6b 100644 --- a/internal/client/ui/core/signallist/signallist.go +++ b/internal/client/ui/core/signallist/signallist.go @@ -55,9 +55,9 @@ func (m Model) Init() tea.Cmd { func (m Model) View() string { signalStyle := lipgloss.NewStyle().Width(m.width-(margin*2)). - Margin(0, margin).Padding(0, padding).Align(lipgloss.Left) + Margin(0, margin).Padding(0, padding).Align(lipgloss.Left). + Background(colors.BackgroundDim).MarginBackground(colors.BackgroundDim) backgroundStyle := lipgloss.NewStyle().Background(colors.BackgroundDim) - backgroundWidthStyle := backgroundStyle.Width(m.width) maxUserWidth := m.width - widthWithoutUser var builder strings.Builder @@ -128,7 +128,7 @@ func (m Model) View() string { } signal := signalStyle.Render(username + notif) - builder.WriteString(backgroundWidthStyle.Render(signal)) + builder.WriteString(signal) builder.WriteString("\n") } |
