From 6d3146270d552e6d57473cc85b0e820e83345a1e Mon Sep 17 00:00:00 2001 From: Username Date: Tue, 24 Feb 2026 09:25:41 +0100 Subject: [PATCH] add configurable tree pane width and message logging --- ui.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui.go b/ui.go index 98b7b7b..20661f0 100644 --- a/ui.go +++ b/ui.go @@ -33,6 +33,7 @@ func (b *Barnard) UpdateInputStatus(status string) { func (b *Barnard) AddOutputLine(line string) { now := time.Now() b.UiOutput.AddLine(fmt.Sprintf("[%02d:%02d:%02d] %s", now.Hour(), now.Minute(), now.Second(), line)) + b.logMessage(line) } func (b *Barnard) AddOutputMessage(sender *gumble.User, message string) { @@ -161,11 +162,12 @@ func (b *Barnard) OnUiInitialize(ui *uiterm.Ui) { } func (b *Barnard) OnUiResize(ui *uiterm.Ui, width, height int) { + tw := b.TreeWidth ui.SetBounds(uiViewLogo, 0, 0, 9, 1) ui.SetBounds(uiViewTop, 9, 0, width-6, 1) ui.SetBounds(uiViewStatus, width-6, 0, width, 1) ui.SetBounds(uiViewInput, 0, height-1, width, height) ui.SetBounds(uiViewInputStatus, 0, height-2, width, height-1) - ui.SetBounds(uiViewOutput, 0, 1, width-20, height-2) - ui.SetBounds(uiViewTree, width-20, 1, width, height-2) + ui.SetBounds(uiViewOutput, 0, 1, width-tw, height-2) + ui.SetBounds(uiViewTree, width-tw, 1, width, height-2) }