diff --git a/ui.go b/ui.go index edae1e2..0ce2b2b 100644 --- a/ui.go +++ b/ui.go @@ -30,17 +30,18 @@ func scalePanelCount(v uint64) string { } var ( - uiBg = rgb{0x0d, 0x0d, 0x0d} - uiInk = rgb{0xf2, 0xf2, 0xf0} - uiInk2 = rgb{0xc3, 0xc2, 0xb7} - uiMuted = rgb{0x89, 0x87, 0x81} - uiHair = rgb{0x28, 0x28, 0x26} - uiGood = rgb{0x0c, 0xa3, 0x0c} - uiWarn = rgb{0xfa, 0xb2, 0x19} - uiCrit = rgb{0xd0, 0x3b, 0x3b} - uiCellOK = rgb{0x0a, 0x5d, 0x0a} - uiCellNA = rgb{0x3a, 0x3a, 0x37} - uiAccent = rgb{0x39, 0x87, 0xe5} + uiBg = rgb{0x0d, 0x0d, 0x0d} + uiInk = rgb{0xf2, 0xf2, 0xf0} + uiInk2 = rgb{0xc3, 0xc2, 0xb7} + uiMuted = rgb{0x89, 0x87, 0x81} + uiHair = rgb{0x28, 0x28, 0x26} + uiGood = rgb{0x0c, 0xa3, 0x0c} + uiWarn = rgb{0xfa, 0xb2, 0x19} + uiCrit = rgb{0xd0, 0x3b, 0x3b} + uiCellOK = rgb{0x0a, 0x5d, 0x0a} + uiCellNA = rgb{0x3a, 0x3a, 0x37} + uiCellMeas = rgb{0x20, 0x4d, 0x83} + uiAccent = rgb{0x39, 0x87, 0xe5} ) func classColor(c int) rgb { @@ -432,12 +433,16 @@ func (d *display) drawColHeaders() { d.hairline(d.rowYs[0] - 1) } -// One row of history cells: na for a slot with nothing believable (never -// sampled, or spent inside a measure), otherwise judged by the row. +// One row of history cells: na for a slot never sampled, the non-committal +// measure color for one spent inside a cable measure, otherwise judged by the +// row. func (d *display) heatRow(rowY int, hv histView, judge func(histSlot) rgb) { for k, s := range hv.slots { c := uiCellNA - if s.sampled && !s.measuring { + switch { + case s.measuring: + c = uiCellMeas + case s.sampled: c = judge(s) } d.heatCell(rowY, k, c)