From 7eb991a4e4bcd00da936a6e2f522eaaba6f3e6f0 Mon Sep 17 00:00:00 2001 From: raul Date: Sat, 27 Apr 2024 21:46:00 +0200 Subject: [PATCH] Tweak chat dimensions --- cmd/clientFunc.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/clientFunc.go b/cmd/clientFunc.go index cb98a58..f4b1dc7 100644 --- a/cmd/clientFunc.go +++ b/cmd/clientFunc.go @@ -161,7 +161,7 @@ func initKeybindings(g *gocui.Gui) error { func layout(g *gocui.Gui) error { maxX, maxY := g.Size() - if chatbox, err := g.SetView("chatbox", 2, 1, maxX/2+40, maxY-5); err != nil { + if chatbox, err := g.SetView("chatbox", 2, 1, maxX-28, maxY-5); err != nil { if err != gocui.ErrUnknownView { return err } @@ -169,7 +169,7 @@ func layout(g *gocui.Gui) error { chatbox.Title = "Chat Box" } - if button, err := g.SetView("button", maxX/2+32, maxY-4, maxX/2+40, maxY-2); err != nil { + if button, err := g.SetView("button", maxX/2+32, maxY-4, maxX-28, maxY-2); err != nil { if err != gocui.ErrUnknownView { return err } @@ -179,7 +179,7 @@ func layout(g *gocui.Gui) error { fmt.Fprintln(button, "Send it") } - if textarea, err := g.SetView("textarea", 2, maxY-4, maxX/2+28, maxY-2); err != nil { + if textarea, err := g.SetView("textarea", 2, maxY-4, maxX-40, maxY-2); err != nil { if err != gocui.ErrUnknownView { return err }