handle ratios change at runtime
This commit is contained in:
1 parent
ee9d4c9ec4
commit
2085b6d797
2 files changed
+9
-3
No files matched your search
@@ -361,7 +361,7 @@ func getWidths(wtot int) []int {
|
||||
return widths
|
||||
}
|
||||
|
||||
func newUI() *ui {
|
||||
func getWins() []*win {
|
||||
wtot, htot := termbox.Size()
|
||||
|
||||
var wins []*win
|
||||
@@ -375,6 +375,12 @@ func newUI() *ui {
|
||||
wacc += widths[i]
|
||||
}
|
||||
|
||||
return wins
|
||||
}
|
||||
|
||||
func newUI() *ui {
|
||||
wtot, htot := termbox.Size()
|
||||
|
||||
key := make(chan string, 1000)
|
||||
evs := make(chan termbox.Event)
|
||||
|
||||
@@ -385,7 +391,7 @@ func newUI() *ui {
|
||||
}()
|
||||
|
||||
return &ui{
|
||||
wins: wins,
|
||||
wins: getWins(),
|
||||
pwdwin: newWin(wtot, 1, 0, 0),
|
||||
msgwin: newWin(wtot, 1, 0, htot-1),
|
||||
menuwin: newWin(wtot, 1, 0, htot-2),
|
||||
|
||||
Reference in new issue
Block a user