diff options
author | Koni Marti <koni.marti@gmail.com> | 2024-01-28 02:08:26 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-01-29 22:46:08 +0100 |
commit | 5719041eb9b846c7d056952e9e14295c65a8b81a (patch) | |
tree | bb8972453befd91fdb7b615456c74509ef82868c /commands/help.go | |
parent | 37b05d7e73b11610f2979abdbe821366e55ee651 (diff) | |
download | aerc-5719041eb9b846c7d056952e9e14295c65a8b81a.tar.gz |
app: define two dialog constructors
Define two new constructor functions for the popup dialog.
DefaultDialog() creates a dialog that spans half of the screen, whereas
the LargeDialog() covers three-quarter of the screen.
If a dialog widget has more specific size requirements, custom window
position and window height functions can be used with NewDialog().
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/help.go')
-rw-r--r-- | commands/help.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/commands/help.go b/commands/help.go index 3d71e5b3..079b2fd5 100644 --- a/commands/help.go +++ b/commands/help.go @@ -59,7 +59,7 @@ func (h *Help) ParseTopic(arg string) error { func (h Help) Execute(args []string) error { if h.Topic == "aerc-keys" { - app.AddDialog(app.NewDialog( + app.AddDialog(app.DefaultDialog( app.NewListBox( "Bindings: Press <Esc> or <Enter> to close. "+ "Start typing to filter bindings.", @@ -69,8 +69,6 @@ func (h Help) Execute(args []string) error { app.CloseDialog() }, ), - func(h int) int { return h / 4 }, - func(h int) int { return h / 2 }, )) return nil } |