aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/compose/attach.go10
-rw-r--r--commands/help.go4
-rw-r--r--commands/menu.go10
-rw-r--r--commands/patch/list.go10
-rw-r--r--commands/patch/rebase.go10
5 files changed, 5 insertions, 39 deletions
diff --git a/commands/compose/attach.go b/commands/compose/attach.go
index cb59eb5f..fa9590c9 100644
--- a/commands/compose/attach.go
+++ b/commands/compose/attach.go
@@ -177,16 +177,8 @@ func (a Attach) openMenu() error {
}
}
- app.AddDialog(app.NewDialog(
+ app.AddDialog(app.LargeDialog(
ui.NewBox(t, "File Picker", "", app.SelectedAccountUiConfig()),
- // start pos on screen
- func(h int) int {
- return h / 8
- },
- // dialog height
- func(h int) int {
- return h - 2*h/8
- },
))
return nil
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
}
diff --git a/commands/menu.go b/commands/menu.go
index 953c6b45..908a354c 100644
--- a/commands/menu.go
+++ b/commands/menu.go
@@ -131,16 +131,8 @@ func (m Menu) Execute([]string) error {
title := " :" + strings.TrimLeft(m.Xargs, ": \t") + " ... "
- app.AddDialog(app.NewDialog(
+ app.AddDialog(app.DefaultDialog(
ui.NewBox(term, title, "", app.SelectedAccountUiConfig()),
- // start pos on screen
- func(h int) int {
- return h / 4
- },
- // dialog height
- func(h int) int {
- return h / 2
- },
))
}
diff --git a/commands/patch/list.go b/commands/patch/list.go
index 73461f2e..ee2850c3 100644
--- a/commands/patch/list.go
+++ b/commands/patch/list.go
@@ -88,18 +88,10 @@ func (l List) Execute(args []string) error {
)
}
- app.AddDialog(app.NewDialog(
+ app.AddDialog(app.LargeDialog(
ui.NewBox(viewer, "Patch Management", "",
app.SelectedAccountUiConfig(),
),
- // start pos on screen
- func(h int) int {
- return h / 8
- },
- // dialog height
- func(h int) int {
- return h - 2*h/8
- },
))
return nil
diff --git a/commands/patch/rebase.go b/commands/patch/rebase.go
index 6ef43299..65aa580a 100644
--- a/commands/patch/rebase.go
+++ b/commands/patch/rebase.go
@@ -117,18 +117,10 @@ func (r Rebase) Execute(args []string) error {
return err
}
- app.AddDialog(app.NewDialog(
+ app.AddDialog(app.LargeDialog(
ui.NewBox(viewer, fmt.Sprintf("Patch Rebase on %-6.6s", baseID), "",
app.SelectedAccountUiConfig(),
),
- // start pos on screen
- func(h int) int {
- return h / 8
- },
- // dialog height
- func(h int) int {
- return h - 2*h/8
- },
))
return nil