added ability to disable border for asciiboxes
This commit is contained in:
parent
b542e0bd0c
commit
25f5a99de9
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue