|
@@ -23,6 +23,7 @@ type Panel struct {
|
|
BorderColor string
|
|
BorderColor string
|
|
Lines []Line
|
|
Lines []Line
|
|
Title string
|
|
Title string
|
|
|
|
+ TitleColor string
|
|
TitleOffset int
|
|
TitleOffset int
|
|
}
|
|
}
|
|
|
|
|
|
@@ -45,7 +46,7 @@ func (p *Panel) Output() string {
|
|
log.Panicf("Panel (not wide enough) Width %d : Title size %d + offset %d = %d\n",
|
|
log.Panicf("Panel (not wide enough) Width %d : Title size %d + offset %d = %d\n",
|
|
p.Width, len(p.Title), p.TitleOffset, p.TitleOffset+len(p.Title))
|
|
p.Width, len(p.Title), p.TitleOffset, p.TitleOffset+len(p.Title))
|
|
}
|
|
}
|
|
- output += strings.Repeat(box_style.top, p.TitleOffset) + p.Title
|
|
|
|
|
|
+ output += strings.Repeat(box_style.top, p.TitleOffset) + p.TitleColor + p.Title + p.BorderColor
|
|
}
|
|
}
|
|
output += strings.Repeat(box_style.top, p.Width-(p.TitleOffset+len(p.Title))) + box_style.top_right
|
|
output += strings.Repeat(box_style.top, p.Width-(p.TitleOffset+len(p.Title))) + box_style.top_right
|
|
row++
|
|
row++
|