From 25f5a99de971e18232b65e6e8cd582f840c21d87 Mon Sep 17 00:00:00 2001 From: sqshq Date: Tue, 9 Apr 2019 22:34:45 -0400 Subject: [PATCH] added ability to disable border for asciiboxes --- component/asciibox/asciibox.go | 2 +- config/default.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/component/asciibox/asciibox.go b/component/asciibox/asciibox.go index 098d85f..6489f84 100644 --- a/component/asciibox/asciibox.go +++ b/component/asciibox/asciibox.go @@ -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, diff --git a/config/default.go b/config/default.go index c27eaa8..971f16b 100644 --- a/config/default.go +++ b/config/default.go @@ -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 }