Fix vertical resizing

Fixes #78
This commit is contained in:
erroneousboat 2018-01-27 12:03:10 +01:00
parent 2b86b6f9fd
commit b234e63ebf

View File

@ -163,6 +163,12 @@ func actionKeyEvent(ctx *context.AppContext, ev termbox.Event) {
func actionResizeEvent(ctx *context.AppContext, ev termbox.Event) {
termui.Body.Width = termui.TermWidth()
// Vertical resize components
ctx.View.Channels.List.Height = termui.TermHeight() - ctx.View.Input.Par.Height
ctx.View.Chat.List.Height = termui.TermHeight() - ctx.View.Input.Par.Height
ctx.View.Debug.List.Height = termui.TermHeight() - ctx.View.Input.Par.Height
termui.Body.Align()
termui.Render(termui.Body)
}