about summary refs log tree commit diff stats
path: root/widgets/compose.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-03-03 16:57:21 -0500
committerDrew DeVault <sir@cmpwn.com>2020-03-03 16:57:21 -0500
commit403b6af37916aad984fb340147a499f61daf1132 (patch)
tree0f23cb1044105b5a693226f6ae40fbea4cc153ac /widgets/compose.go
parentf3158b36f1f210ff54febbe82b571c1379b30c98 (diff)
downloadaerc-403b6af37916aad984fb340147a499f61daf1132.tar.gz
compose: add space between headers and editor
Until the PGP changes, this was merged into the header widget.
Diffstat (limited to 'widgets/compose.go')
-rw-r--r--widgets/compose.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 0e837e5..a97e5fe 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -649,7 +649,7 @@ func (c *Composer) resetReview() {
 	if c.review != nil {
 		c.grid.RemoveChild(c.review)
 		c.review = newReviewMessage(c, nil)
-		c.grid.AddChild(c.review).At(1, 0)
+		c.grid.AddChild(c.review).At(2, 0)
 	}
 }
 
@@ -668,7 +668,7 @@ func (c *Composer) termEvent(event tcell.Event) bool {
 func (c *Composer) termClosed(err error) {
 	c.grid.RemoveChild(c.editor)
 	c.review = newReviewMessage(c, err)
-	c.grid.AddChild(c.review).At(1, 0)
+	c.grid.AddChild(c.review).At(2, 0)
 	c.editor.Destroy()
 	c.editor = nil
 	c.focusable = c.focusable[:len(c.focusable)-1]
@@ -695,7 +695,7 @@ func (c *Composer) ShowTerminal() {
 	c.editor, _ = NewTerminal(editor) // TODO: handle error
 	c.editor.OnEvent = c.termEvent
 	c.editor.OnClose = c.termClosed
-	c.grid.AddChild(c.editor).At(1, 0)
+	c.grid.AddChild(c.editor).At(2, 0)
 	c.focusable = append(c.focusable, c.editor)
 }
 
@@ -768,6 +768,7 @@ func (c *Composer) updateGrid() {
 
 	c.grid.Rows([]ui.GridSpec{
 		{ui.SIZE_EXACT, height},
+		{ui.SIZE_EXACT, 1},
 		{ui.SIZE_WEIGHT, 1},
 	})
 
@@ -776,6 +777,7 @@ func (c *Composer) updateGrid() {
 	}
 	c.header = header
 	c.grid.AddChild(c.header).At(0, 0)
+	c.grid.AddChild(ui.NewFill(' ')).At(1, 0)
 }
 
 func (c *Composer) reloadEmail() error {