]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/tool/kconfig/scripts/kconfig/lxdialog/checklist.c
update
[l4.git] / l4 / tool / kconfig / scripts / kconfig / lxdialog / checklist.c
index a2eb80fbc896fe28b2b0f8efc614cf83fcbfc7b8..3b15c08ec1fac369f9b6e0b01c738e46fa3efb2d 100644 (file)
@@ -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);