diff options
author | phantom <phantom@FreeBSD.org> | 2005-01-04 11:30:24 +0000 |
---|---|---|
committer | phantom <phantom@FreeBSD.org> | 2005-01-04 11:30:24 +0000 |
commit | bd3946435d5fbbfdb865c5a53c79c2572161c36a (patch) | |
tree | 6d55c7b127aad29e202b11d1178b15971113653d /gnu | |
parent | fa189c3dd0bb91745949786f5886b284636ae445 (diff) | |
download | FreeBSD-src-bd3946435d5fbbfdb865c5a53c79c2572161c36a.zip FreeBSD-src-bd3946435d5fbbfdb865c5a53c79c2572161c36a.tar.gz |
Fix 'redraw' of checklist box. It is occurs in situation when size of
checklist box is strictly set via command line, but amount of checklist
items less than height of checklist box. In this case bottom part
of box was not redrawn (occurs when passing focus behind of 'Cancel' button
while configuring any FreeBSD port OPTIONS)
MFC after: 3 days
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/lib/libdialog/checklist.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libdialog/checklist.c index 39b36ab..dc65d75 100644 --- a/gnu/lib/libdialog/checklist.c +++ b/gnu/lib/libdialog/checklist.c @@ -567,6 +567,15 @@ draw: if (redraw_menu) { getyx(list, old_y, old_x); wclear(list); + + /* + * Re-draw a box around the list items. It is required + * if amount of list items is smaller than height of listbox. + * Otherwise un-redrawn field will be filled with default + * screen attributes instead of dialog attributes. + */ + draw_box(dialog, box_y, box_x, list_height + 2, list_width + 2, menubox_border_attr, menubox_attr); + for (i = 0; i < max_choice; i++) print_item(list, items[(scroll + i) * 3], items[(scroll + i) * 3 + 1], status[scroll + i], i, i == choice, DREF(ditems, scroll + i), list_width, item_x, check_x); print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y); |