Adjust height of vehicle list items in vehicle lists

This commit is contained in:
Jonathan G Rennison
2022-12-04 22:02:26 +00:00
parent 7c882b43eb
commit c457dc680b
3 changed files with 5 additions and 4 deletions

View File

@@ -1782,9 +1782,9 @@ void DrawVehicleImage(const Vehicle *v, const Rect &r, VehicleID selection, Engi
uint GetVehicleListHeight(VehicleType type, uint divisor)
{
/* Name + vehicle + profit */
uint base = ScaleGUITrad(GetVehicleHeight(type)) + 2 * FONT_HEIGHT_SMALL;
uint base = ScaleGUITrad(GetVehicleHeight(type)) + 2 * FONT_HEIGHT_SMALL + ScaleGUITrad(1);
/* Drawing of the 4 small orders + profit*/
if (type >= VEH_SHIP) base = std::max(base, 5U * FONT_HEIGHT_SMALL);
if (type >= VEH_SHIP) base = std::max(base, 5U * FONT_HEIGHT_SMALL + ScaleGUITrad(1));
if (divisor == 1) return base;