@@ -237,49 +237,49 @@ void ShowDropDownList(Window *w, DropDow
/* If not, check if it will fit above the widget */
if (w->top + wi->top - height > screen_top) {
top = w->top + wi->top - height;
} else {
/* ... and lastly if it won't, enable the scroll bar and fit the
* list in below the widget */
int rows = (screen_bottom - 4 - top) / 10;
height = rows * 10 + 4;
scroll = true;
}
if (width == 0) width = wi->right - wi->left + 1;
Window *dw = AllocateWindow(
w->left + wi->left,
top,
width,
height,
DropDownMenuWndProc,
WC_DROPDOWN_MENU,
_dropdown_menu_widgets);
dw->widget[0].color = wi->color;
dw->widget[0].right = width + 1;
dw->widget[0].right = width - 1;
dw->widget[0].bottom = height - 1;
dw->SetWidgetHiddenState(1, !scroll);
if (scroll) {
/* We're scrolling, so enable the scroll bar and shrink the list by
* the scrollbar's width */
dw->widget[1].color = wi->color;
dw->widget[1].right = dw->widget[0].right;
dw->widget[1].left = dw->widget[1].right - 11;
dw->widget[1].bottom = height - 1;
dw->widget[0].right -= 12;
dw->vscroll.cap = (height - 4) / 10;
dw->vscroll.count = list->size();
dw->desc_flags = WDF_DEF_WIDGET;
dw->flags4 &= ~WF_WHITE_BORDER_MASK;
WP(dw, dropdown_d).parent_wnd_class = w->window_class;
WP(dw, dropdown_d).parent_wnd_num = w->window_number;
WP(dw, dropdown_d).parent_button = button;
WP(dw, dropdown_d).list = list;
Status change: