diff --git a/dialog/params.go b/dialog/params.go index c046d96..f8350b2 100644 --- a/dialog/params.go +++ b/dialog/params.go @@ -9,7 +9,7 @@ import ( var ( views = []string{} - layoutStep = 3 + layoutStep = 4 curView = -1 idxView = 0 diff --git a/dialog/view.go b/dialog/view.go index b7abe18..a495616 100644 --- a/dialog/view.go +++ b/dialog/view.go @@ -45,11 +45,15 @@ func GenerateParamsLayout(params map[string]string, command string) { maxX, maxY := g.Size() generateView(g, "Command(TAB => Select next, ENTER => Execute command):", - command, []int{maxX / 10, maxY / 10, (maxX / 2) + (maxX / 3), maxY/10 + 5}, false) + command, []int{(maxX / 2) - (maxX / 3), maxY / 10, (maxX / 2) + (maxX / 3), maxY/10 + 5}, false) idx := 0 for k, v := range params { - generateView(g, k, v, []int{maxX / 10, (maxY / 4) + (idx+1)*layoutStep, - maxX/10 + 20, (maxY / 4) + 2 + (idx+1)*layoutStep}, true) + generateView(g, k, v, + []int{(maxX / 2) - (maxX / 4), + (maxY / 4) + (idx+1)*layoutStep, + (maxX / 2) + (maxX / 4), + (maxY / 4) + 2 + (idx+1)*layoutStep}, + true) idx++ }