Paint timeline slots spent in a cable measure blue
This commit is contained in:
@@ -30,17 +30,18 @@ func scalePanelCount(v uint64) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
uiBg = rgb{0x0d, 0x0d, 0x0d}
|
uiBg = rgb{0x0d, 0x0d, 0x0d}
|
||||||
uiInk = rgb{0xf2, 0xf2, 0xf0}
|
uiInk = rgb{0xf2, 0xf2, 0xf0}
|
||||||
uiInk2 = rgb{0xc3, 0xc2, 0xb7}
|
uiInk2 = rgb{0xc3, 0xc2, 0xb7}
|
||||||
uiMuted = rgb{0x89, 0x87, 0x81}
|
uiMuted = rgb{0x89, 0x87, 0x81}
|
||||||
uiHair = rgb{0x28, 0x28, 0x26}
|
uiHair = rgb{0x28, 0x28, 0x26}
|
||||||
uiGood = rgb{0x0c, 0xa3, 0x0c}
|
uiGood = rgb{0x0c, 0xa3, 0x0c}
|
||||||
uiWarn = rgb{0xfa, 0xb2, 0x19}
|
uiWarn = rgb{0xfa, 0xb2, 0x19}
|
||||||
uiCrit = rgb{0xd0, 0x3b, 0x3b}
|
uiCrit = rgb{0xd0, 0x3b, 0x3b}
|
||||||
uiCellOK = rgb{0x0a, 0x5d, 0x0a}
|
uiCellOK = rgb{0x0a, 0x5d, 0x0a}
|
||||||
uiCellNA = rgb{0x3a, 0x3a, 0x37}
|
uiCellNA = rgb{0x3a, 0x3a, 0x37}
|
||||||
uiAccent = rgb{0x39, 0x87, 0xe5}
|
uiCellMeas = rgb{0x20, 0x4d, 0x83}
|
||||||
|
uiAccent = rgb{0x39, 0x87, 0xe5}
|
||||||
)
|
)
|
||||||
|
|
||||||
func classColor(c int) rgb {
|
func classColor(c int) rgb {
|
||||||
@@ -432,12 +433,16 @@ func (d *display) drawColHeaders() {
|
|||||||
d.hairline(d.rowYs[0] - 1)
|
d.hairline(d.rowYs[0] - 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// One row of history cells: na for a slot with nothing believable (never
|
// One row of history cells: na for a slot never sampled, the non-committal
|
||||||
// sampled, or spent inside a measure), otherwise judged by the row.
|
// 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) {
|
func (d *display) heatRow(rowY int, hv histView, judge func(histSlot) rgb) {
|
||||||
for k, s := range hv.slots {
|
for k, s := range hv.slots {
|
||||||
c := uiCellNA
|
c := uiCellNA
|
||||||
if s.sampled && !s.measuring {
|
switch {
|
||||||
|
case s.measuring:
|
||||||
|
c = uiCellMeas
|
||||||
|
case s.sampled:
|
||||||
c = judge(s)
|
c = judge(s)
|
||||||
}
|
}
|
||||||
d.heatCell(rowY, k, c)
|
d.heatCell(rowY, k, c)
|
||||||
|
|||||||
Reference in New Issue
Block a user