buildPlainBar builds a horizontal bar (without title) that matches the specified visual line width.
(left, fill, right string, leftW, rightW, lineWidth, horizontalWidth int)
| 104 | // buildPlainBar builds a horizontal bar (without title) that matches the |
| 105 | // specified visual line width. |
| 106 | func buildPlainBar(left, fill, right string, leftW, rightW, lineWidth, horizontalWidth int) string { |
| 107 | inner := max(lineWidth-leftW-rightW, 0) |
| 108 | bar := buildSegment(fill, inner, horizontalWidth) |
| 109 | return left + bar + right |
| 110 | } |
| 111 | |
| 112 | // buildTitledBar builds a top or bottom bar containing a title. It left-aligns |
| 113 | // the title segment and fills the remaining space on the right with the |