added ability to disable border for asciiboxes

This commit is contained in:
sqshq 2019-04-09 22:34:45 -04:00
parent b542e0bd0c
commit 25f5a99de9
2 changed files with 5 additions and 1 deletions

View File

@ -45,7 +45,7 @@ func NewAsciiBox(c config.AsciiBoxConfig, palette console.Palette) *AsciiBox {
}
box := AsciiBox{
Block: component.NewBlock(c.Title, true, palette),
Block: component.NewBlock(c.Title, *c.Border, palette),
Consumer: data.NewConsumer(),
style: ui.NewStyle(*color),
render: render,

View File

@ -118,6 +118,10 @@ func (c *Config) setDefaultValues() {
font := console.AsciiFontFlat
box.Font = &font
}
if box.Border == nil {
border := true
box.Border = &border
}
c.AsciiBoxes[i] = box
}