add stats data to stats table
(s statsSummary, t *tview.Table)
| 148 | |
| 149 | // add stats data to stats table |
| 150 | func drawStats(s statsSummary, t *tview.Table) { |
| 151 | t.Clear() |
| 152 | summaryData := s.getSummaryData() |
| 153 | rows, cols := len(summaryData), len(summaryData[0]) |
| 154 | |
| 155 | for r := 0; r < rows; r++ { |
| 156 | for c := 0; c < cols; c++ { |
| 157 | color := tcell.ColorWhite |
| 158 | backgroundColor := tcell.ColorDefault |
| 159 | |
| 160 | // Modern styling: alternate row colors for better readability |
| 161 | if r%2 == 1 { |
| 162 | backgroundColor = tcell.NewRGBColor(20, 20, 30) |
| 163 | } |
| 164 | |
| 165 | // Highlight stat labels with accent color |
| 166 | if c == 0 { |
| 167 | color = tcell.NewRGBColor(100, 200, 255) // Soft blue for labels |
| 168 | } |
| 169 | |
| 170 | t.SetCell(r, c, |
| 171 | tview.NewTableCell(summaryData[r][c]). |
| 172 | SetTextColor(color). |
| 173 | SetBackgroundColor(backgroundColor). |
| 174 | SetAlign(tview.AlignLeft)) |
| 175 | } |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | // draw app UI |
| 180 | func drawUI(b *Buffer) error { |
no test coverage detected