diff --git a/lib/widget/dialog.c b/lib/widget/dialog.c
index 424e4c9..30cad1e 100644
a
|
b
|
dlg_set_position (WDialog * h, int y1, int x1, int y2, int x2) |
700 | 700 | } |
701 | 701 | |
702 | 702 | /* --------------------------------------------------------------------------------------------- */ |
703 | | /** this function sets only size, leaving positioning to automatic methods */ |
| 703 | /** sets dialog size and position */ |
704 | 704 | |
705 | 705 | void |
706 | 706 | dlg_set_size (WDialog * h, int lines, int cols) |
… |
… |
dlg_set_size (WDialog * h, int lines, int cols) |
714 | 714 | x = (COLS - cols) / 2; |
715 | 715 | } |
716 | 716 | |
717 | | if ((h->flags & DLG_TRYUP) && (y > 3)) |
718 | | y -= 2; |
| 717 | if (h->flags & DLG_TRYUP) |
| 718 | { |
| 719 | if (y > 3) |
| 720 | y -= 2; |
| 721 | else if (y == 3) |
| 722 | y = 2; |
| 723 | } |
719 | 724 | |
720 | 725 | dlg_set_position (h, y, x, y + lines, x + cols); |
721 | 726 | } |
diff --git a/lib/widget/listbox-window.c b/lib/widget/listbox-window.c
index 94bb57c..1651cc7 100644
a
|
b
|
create_listbox_window_centered (int center_y, int center_x, int lines, int cols, |
106 | 106 | |
107 | 107 | listbox->dlg = |
108 | 108 | dlg_create (TRUE, ypos, xpos, lines + space, cols + space, |
109 | | listbox_colors, NULL, NULL, help, title, DLG_TRYUP); |
| 109 | listbox_colors, NULL, NULL, help, title, DLG_CENTER | DLG_TRYUP); |
110 | 110 | |
111 | 111 | listbox->list = listbox_new (2, 2, lines, cols, FALSE, NULL); |
112 | 112 | add_widget (listbox->dlg, listbox->list); |