row style
This commit is contained in:
@@ -181,10 +181,19 @@ func DrawTableWarm(header []string, rows []any) image.Image {
|
||||
y := headerHeight
|
||||
for rowIndex, row := range rows {
|
||||
bg := rowBg1
|
||||
|
||||
if rowIndex%2 == 1 {
|
||||
bg = rowBg2
|
||||
}
|
||||
|
||||
sCells := row
|
||||
|
||||
switch rt := row.(type) {
|
||||
case ITableRow:
|
||||
bg = rt.GetBackgroundColor()
|
||||
sCells = rt.GetCells()
|
||||
}
|
||||
|
||||
// фон строки
|
||||
for xx := 0; xx < imgWidth; xx++ {
|
||||
for yy := 0; yy < rowHeight; yy++ {
|
||||
@@ -197,7 +206,7 @@ func DrawTableWarm(header []string, rows []any) image.Image {
|
||||
img.Set(xx, y, dividerCol)
|
||||
}
|
||||
|
||||
cells := rowToStrings(row)
|
||||
cells := rowToStrings(sCells)
|
||||
|
||||
x = 0
|
||||
for i := 0; i < colCount && i < len(cells); i++ {
|
||||
|
||||
Reference in New Issue
Block a user