From 851f665725581d02d48ffbca50240cda44d698d4 Mon Sep 17 00:00:00 2001 From: Sedat Dilek Date: Sat, 15 Jun 2013 11:07:35 +0200 Subject: kconfig/lxdialog: Add definitions for mininimum (re)size values Commit c8dc68ad0fbd ("kconfig/lxdialog: support resize") added support for resizing, but forgot to collect all hardcoded values at one single place. Also add a definition for the check for a minimum screen/window size of 80x19. [ ChangeLog v3: * Rename MENU_{HEIGTH,WIDTH}_MIN -> MENUBOX_{HEIGTH,WIDTH}_MIN ChangeLog v2: * Rename WIN_{HEIGTH,WIDTH}_MIN -> WINDOW_{HEIGTH,WIDTH}_MIN * Mention the check for a minimum screen/window size in the changelog * Add a comment above the block of new definitions ] Signed-off-by: Sedat Dilek Acked-by: Wang YanQing Tested-by: "Yann E. MORIN" Reviewed-by: "Yann E. MORIN" Signed-off-by: "Yann E. MORIN" --- scripts/kconfig/lxdialog/dialog.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'scripts/kconfig/lxdialog/dialog.h') diff --git a/scripts/kconfig/lxdialog/dialog.h b/scripts/kconfig/lxdialog/dialog.h index 1099337079b6..b4343d384926 100644 --- a/scripts/kconfig/lxdialog/dialog.h +++ b/scripts/kconfig/lxdialog/dialog.h @@ -200,6 +200,20 @@ int item_is_tag(char tag); int on_key_esc(WINDOW *win); int on_key_resize(void); +/* minimum (re)size values */ +#define CHECKLIST_HEIGTH_MIN 6 /* For dialog_checklist() */ +#define CHECKLIST_WIDTH_MIN 6 +#define INPUTBOX_HEIGTH_MIN 2 /* For dialog_inputbox() */ +#define INPUTBOX_WIDTH_MIN 2 +#define MENUBOX_HEIGTH_MIN 15 /* For dialog_menu() */ +#define MENUBOX_WIDTH_MIN 65 +#define TEXTBOX_HEIGTH_MIN 8 /* For dialog_textbox() */ +#define TEXTBOX_WIDTH_MIN 8 +#define YESNO_HEIGTH_MIN 4 /* For dialog_yesno() */ +#define YESNO_WIDTH_MIN 4 +#define WINDOW_HEIGTH_MIN 19 /* For init_dialog() */ +#define WINDOW_WIDTH_MIN 80 + int init_dialog(const char *backtitle); void set_dialog_backtitle(const char *backtitle); void set_dialog_subtitles(struct subtitle_list *subtitles); -- cgit v1.2.3