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

Method applyHeaderStyle

gui/table.go:1549–1556  ·  view source on GitHub ↗

applyHeaderStyle applies style to the specified table header the last header panel does not the right border.

(h *Panel, last bool)

Source from the content-addressed store, hash-verified

1547// applyHeaderStyle applies style to the specified table header
1548// the last header panel does not the right border.
1549func (t *Table) applyHeaderStyle(h *Panel, last bool) {
1550
1551 styleCopy := t.styles.Header.PanelStyle
1552 if last {
1553 styleCopy.Border.Right = 0
1554 }
1555 h.ApplyStyle(&styleCopy)
1556}
1557
1558// applyRowStyle applies the specified style to all cells for the specified table row
1559func (t *Table) applyRowStyle(trow *tableRow, trs *TableRowStyle) {

Callers 1

NewTableFunction · 0.80

Calls 1

ApplyStyleMethod · 0.45

Tested by

no test coverage detected