|
@@ -381,25 +381,25 @@ void ShowDropDownList(Window *w, DropDow
|
|
|
int avg_height = list_height / (int)list->size();
|
|
|
int rows = (screen_bottom - 4 - top) / avg_height;
|
|
|
height = rows * avg_height;
|
|
|
scroll = true;
|
|
|
/* Add space for the scroll bar if we automatically determined
|
|
|
* the width of the list. */
|
|
|
max_item_width += WD_VSCROLLBAR_WIDTH;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (auto_width) width = max(width, max_item_width);
|
|
|
|
|
|
Point dw_pos = {w->left + wi_rect.left, top};
|
|
|
Point dw_pos = { w->left + (_dynlang.text_dir == TD_RTL ? wi_rect.right + 1 - width : wi_rect.left), top};
|
|
|
Dimension dw_size = {width, height};
|
|
|
new DropdownWindow(w, list, selected, button, instant_close, dw_pos, dw_size, wi_colour, scroll);
|
|
|
}
|
|
|
|
|
|
/** Show a dropdown menu window near a widget of the parent window.
|
|
|
* The result code of the items is their index in the #strings list.
|
|
|
* @param w Parent window that wants the dropdown menu.
|
|
|
* @param strings Menu list, end with #INVALID_STRING_ID
|
|
|
* @param selected Index of initial selected item.
|
|
|
* @param button Button widget number of the parent window #w that wants the dropdown menu.
|
|
|
* @param disabled_mask Bitmask for diabled items (items with their bit set are not copied to the dropdown list).
|
|
|
* @param hidden_mask Bitmask for hidden items (items with their bit set are displayed, but not selectable in the dropdown list).
|