Adjust height of vehicle list items in vehicle lists
This commit is contained in:
@@ -263,7 +263,7 @@ private:
|
|||||||
this->column_size[VGC_NUMBER] = GetStringBoundingBox(STR_GROUP_COUNT_WITH_SUBGROUP);
|
this->column_size[VGC_NUMBER] = GetStringBoundingBox(STR_GROUP_COUNT_WITH_SUBGROUP);
|
||||||
this->tiny_step_height = std::max(this->tiny_step_height, this->column_size[VGC_NUMBER].height);
|
this->tiny_step_height = std::max(this->tiny_step_height, this->column_size[VGC_NUMBER].height);
|
||||||
|
|
||||||
this->tiny_step_height += WidgetDimensions::scaled.framerect.Vertical() + 1;
|
this->tiny_step_height += WidgetDimensions::scaled.framerect.Vertical() + ScaleGUITrad(2);
|
||||||
|
|
||||||
return WidgetDimensions::scaled.framerect.left +
|
return WidgetDimensions::scaled.framerect.left +
|
||||||
this->column_size[VGC_FOLD].width + WidgetDimensions::scaled.hsep_normal +
|
this->column_size[VGC_FOLD].width + WidgetDimensions::scaled.hsep_normal +
|
||||||
|
@@ -45,6 +45,7 @@
|
|||||||
#include "toolbar_gui.h"
|
#include "toolbar_gui.h"
|
||||||
#include "core/geometry_func.hpp"
|
#include "core/geometry_func.hpp"
|
||||||
#include "infrastructure_func.h"
|
#include "infrastructure_func.h"
|
||||||
|
#include "zoom_func.h"
|
||||||
|
|
||||||
#include "safeguards.h"
|
#include "safeguards.h"
|
||||||
|
|
||||||
@@ -3604,7 +3605,7 @@ private:
|
|||||||
this->column_size[VGC_NUMBER] = GetStringBoundingBox(STR_TRACE_RESTRICT_SLOT_MAX_OCCUPANCY);
|
this->column_size[VGC_NUMBER] = GetStringBoundingBox(STR_TRACE_RESTRICT_SLOT_MAX_OCCUPANCY);
|
||||||
this->tiny_step_height = std::max(this->tiny_step_height, this->column_size[VGC_NUMBER].height);
|
this->tiny_step_height = std::max(this->tiny_step_height, this->column_size[VGC_NUMBER].height);
|
||||||
|
|
||||||
this->tiny_step_height += WidgetDimensions::scaled.matrix.top;
|
this->tiny_step_height += WidgetDimensions::scaled.matrix.top + ScaleGUITrad(1);
|
||||||
|
|
||||||
return WidgetDimensions::scaled.framerect.Horizontal() + WidgetDimensions::scaled.vsep_wide +
|
return WidgetDimensions::scaled.framerect.Horizontal() + WidgetDimensions::scaled.vsep_wide +
|
||||||
this->column_size[VGC_NAME].width + WidgetDimensions::scaled.vsep_wide +
|
this->column_size[VGC_NAME].width + WidgetDimensions::scaled.vsep_wide +
|
||||||
|
@@ -1782,9 +1782,9 @@ void DrawVehicleImage(const Vehicle *v, const Rect &r, VehicleID selection, Engi
|
|||||||
uint GetVehicleListHeight(VehicleType type, uint divisor)
|
uint GetVehicleListHeight(VehicleType type, uint divisor)
|
||||||
{
|
{
|
||||||
/* Name + vehicle + profit */
|
/* 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*/
|
/* 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;
|
if (divisor == 1) return base;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user