Fixed dropdown lists in main toolbar

This commit is contained in:
Sergii Pylypenko
2014-06-03 21:42:33 +03:00
parent 15db61be69
commit c323eb1c8a
3 changed files with 35 additions and 14 deletions

View File

@@ -176,10 +176,10 @@ static void PopupMainToolbMenu(Window *w, int widget, DropDownList *list, int de
} else {
Rect wi_rect;
NWidgetCore *nwi = w->GetWidget<NWidgetCore>(widget);
wi_rect.left = ((int)nwi->pos_x < _screen.width / 2) ? nwi->pos_x + nwi->current_x - 1 : nwi->pos_x - nwi->current_x;
wi_rect.right = ((int)nwi->pos_x < _screen.width / 2) ? nwi->pos_x + nwi->current_x * 2 : nwi->pos_x - 1;
wi_rect.left = nwi->pos_x;
wi_rect.right = nwi->pos_x + nwi->current_x;
wi_rect.top = nwi->pos_y;
wi_rect.bottom = nwi->pos_y + nwi->current_y - 1;
wi_rect.bottom = nwi->pos_y + nwi->current_y;
ShowDropDownListAt(w, list, def, widget, wi_rect, nwi->colour, true, true);
}
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);