updateRowStyle applies the correct style for the specified row
(ri int)
| 1527 | |
| 1528 | // updateRowStyle applies the correct style for the specified row |
| 1529 | func (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. |
no test coverage detected