summaryrefslogtreecommitdiff
path: root/misc/tools/kconfig-frontends/libs/lxdialog/checklist.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/tools/kconfig-frontends/libs/lxdialog/checklist.c')
-rw-r--r--misc/tools/kconfig-frontends/libs/lxdialog/checklist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/tools/kconfig-frontends/libs/lxdialog/checklist.c b/misc/tools/kconfig-frontends/libs/lxdialog/checklist.c
index a2eb80fbc..3b15c08ec 100644
--- a/misc/tools/kconfig-frontends/libs/lxdialog/checklist.c
+++ b/misc/tools/kconfig-frontends/libs/lxdialog/checklist.c
@@ -132,16 +132,16 @@ int dialog_checklist(const char *title, const char *prompt, int height,
}
do_resize:
- if (getmaxy(stdscr) < (height + 6))
+ if (getmaxy(stdscr) < (height + CHECKLIST_HEIGTH_MIN))
return -ERRDISPLAYTOOSMALL;
- if (getmaxx(stdscr) < (width + 6))
+ if (getmaxx(stdscr) < (width + CHECKLIST_WIDTH_MIN))
return -ERRDISPLAYTOOSMALL;
max_choice = MIN(list_height, item_count());
/* center dialog box on screen */
- x = (COLS - width) / 2;
- y = (LINES - height) / 2;
+ x = (getmaxx(stdscr) - width) / 2;
+ y = (getmaxy(stdscr) - height) / 2;
draw_shadow(stdscr, y, x, height, width);