(clr aec.ANSI, s string)
| 527 | } |
| 528 | |
| 529 | func (h imgColumn) PrintR(clr aec.ANSI, s string) string { |
| 530 | ln := tui.Width(s) |
| 531 | fill := h.Width - ln |
| 532 | |
| 533 | if fill < 0 { |
| 534 | if h.NoEllipsis { |
| 535 | fill = 0 |
| 536 | } else { |
| 537 | return clr.Apply(tui.Ellipsis(s, h.Width)) |
| 538 | } |
| 539 | } |
| 540 | |
| 541 | return strings.Repeat(" ", fill) + clr.Apply(s) |
| 542 | } |
| 543 | |
| 544 | // widestFirstColumnValue calculates the width needed to fully display the image names and platforms. |
| 545 | func widestFirstColumnValue(headers []imgColumn, images []topImage) int { |