MCPcopy
hub / github.com/g3n/engine / updateRowStyle

Method updateRowStyle

gui/table.go:1529–1545  ·  view source on GitHub ↗

updateRowStyle applies the correct style for the specified row

(ri int)

Source from the content-addressed store, hash-verified

1527
1528// updateRowStyle applies the correct style for the specified row
1529func (t *Table) updateRowStyle(ri int) {
1530
1531 row := t.rows[ri]
1532 var trs TableRowStyle
1533 if ri == t.rowCursor {
1534 trs = t.styles.RowCursor
1535 } else if row.selected {
1536 trs = t.styles.RowSel
1537 } else {
1538 if ri%2 == 0 {
1539 trs = t.styles.RowEven
1540 } else {
1541 trs = t.styles.RowOdd
1542 }
1543 }
1544 t.applyRowStyle(row, &trs)
1545}
1546
1547// applyHeaderStyle applies style to the specified table header
1548// the last header panel does not the right border.

Callers 2

insertRowMethod · 0.95
recalcMethod · 0.95

Calls 1

applyRowStyleMethod · 0.95

Tested by

no test coverage detected