From e8c78df39ef553431f4083f06fd982956bf0c1e5 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Fri, 5 Apr 2024 08:18:12 +0100 Subject: [PATCH] Fix #12233: Mini order list overlaps vehicle group name. (#12423) Move mini order list down one line to make room. --- src/vehicle_gui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 6a2197db25..94fc106bae 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1682,7 +1682,7 @@ uint GetVehicleListHeight(VehicleType type, uint divisor) /* Name + vehicle + profit */ uint base = ScaleGUITrad(GetVehicleHeight(type)) + 2 * GetCharacterHeight(FS_SMALL) + WidgetDimensions::scaled.matrix.Vertical(); /* Drawing of the 4 small orders + profit*/ - if (type >= VEH_SHIP) base = std::max(base, 5U * GetCharacterHeight(FS_SMALL) + WidgetDimensions::scaled.matrix.Vertical()); + if (type >= VEH_SHIP) base = std::max(base, 6U * GetCharacterHeight(FS_SMALL) + WidgetDimensions::scaled.matrix.Vertical()); if (divisor == 1) return base; @@ -1774,7 +1774,7 @@ void BaseVehicleListWindow::DrawVehicleListItems(VehicleID selected_vehicle, int DrawString(tr.left, tr.right, ir.top, STR_GROUP_NAME, TC_BLACK, SA_LEFT, false, FS_SMALL); } - if (show_orderlist) DrawSmallOrderList(v, olr.left, olr.right, ir.top, this->order_arrow_width, v->cur_real_order_index); + if (show_orderlist) DrawSmallOrderList(v, olr.left, olr.right, ir.top + GetCharacterHeight(FS_SMALL), this->order_arrow_width, v->cur_real_order_index); TextColour tc; if (v->IsChainInDepot()) { @@ -1796,7 +1796,7 @@ void BaseVehicleListWindow::DrawVehicleListItems(VehicleID selected_vehicle, int DrawVehicleImage(vehgroup.vehicles_begin[i], {image_left + WidgetDimensions::scaled.hsep_wide * i, ir.top, image_right, ir.bottom}, selected_vehicle, EIT_IN_LIST, 0); } - if (show_orderlist) DrawSmallOrderList((vehgroup.vehicles_begin[0])->GetFirstOrder(), olr.left, olr.right, ir.top, this->order_arrow_width); + if (show_orderlist) DrawSmallOrderList((vehgroup.vehicles_begin[0])->GetFirstOrder(), olr.left, olr.right, ir.top + GetCharacterHeight(FS_SMALL), this->order_arrow_width); SetDParam(0, vehgroup.NumVehicles()); DrawString(ir.left, ir.right, ir.top + WidgetDimensions::scaled.framerect.top, STR_JUST_COMMA, TC_BLACK);