|
@@ -197,13 +197,13 @@ struct TimetableWindow : Window {
|
|
|
}
|
|
|
|
|
|
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
|
|
|
{
|
|
|
switch (widget) {
|
|
|
case WID_VT_ARRIVAL_DEPARTURE_PANEL:
|
|
|
SetDParam(0, MAX_YEAR * DAYS_IN_YEAR);
|
|
|
SetDParamMaxValue(0, MAX_YEAR * DAYS_IN_YEAR);
|
|
|
this->deparr_time_width = GetStringBoundingBox(STR_JUST_DATE_TINY).width;
|
|
|
this->deparr_abbr_width = max(GetStringBoundingBox(STR_TIMETABLE_ARRIVAL_ABBREVIATION).width, GetStringBoundingBox(STR_TIMETABLE_DEPARTURE_ABBREVIATION).width);
|
|
|
size->width = WD_FRAMERECT_LEFT + this->deparr_abbr_width + 10 + this->deparr_time_width + WD_FRAMERECT_RIGHT;
|
|
|
/* FALL THROUGH */
|
|
|
case WID_VT_ARRIVAL_DEPARTURE_SELECTION:
|
|
|
case WID_VT_TIMETABLE_PANEL:
|
|
@@ -365,13 +365,13 @@ struct TimetableWindow : Window {
|
|
|
int y = r.top + WD_FRAMERECT_TOP;
|
|
|
int i = this->vscroll->GetPosition();
|
|
|
VehicleOrderID order_id = (i + 1) / 2;
|
|
|
bool final_order = false;
|
|
|
|
|
|
bool rtl = _current_text_dir == TD_RTL;
|
|
|
SetDParam(0, 99);
|
|
|
SetDParamMaxValue(0, v->GetNumOrders(), 2);
|
|
|
int index_column_width = GetStringBoundingBox(STR_ORDER_INDEX).width + 2 * GetSpriteSize(rtl ? SPR_ARROW_RIGHT : SPR_ARROW_LEFT).width + 3;
|
|
|
int middle = rtl ? r.right - WD_FRAMERECT_RIGHT - index_column_width : r.left + WD_FRAMERECT_LEFT + index_column_width;
|
|
|
|
|
|
const Order *order = v->GetOrder(order_id);
|
|
|
while (order != NULL) {
|
|
|
/* Don't draw anything if it extends past the end of the window. */
|