mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
handle window resize in help dialog
This commit is contained in:
3
menus.go
3
menus.go
@@ -37,7 +37,10 @@ func HelpMenu() MenuFn {
|
|||||||
m := menu.NewMenu()
|
m := menu.NewMenu()
|
||||||
m.BorderLabel = "Help"
|
m.BorderLabel = "Help"
|
||||||
m.AddItems(helpDialog...)
|
m.AddItems(helpDialog...)
|
||||||
|
ui.Handle("/sys/wnd/resize", func(e ui.Event) {
|
||||||
|
ui.Clear()
|
||||||
ui.Render(m)
|
ui.Render(m)
|
||||||
|
})
|
||||||
ui.Handle("/sys/kbd/", func(ui.Event) {
|
ui.Handle("/sys/kbd/", func(ui.Event) {
|
||||||
ui.StopLoop()
|
ui.StopLoop()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user