@@ -28,6 +28,7 @@
#include "widgets/dropdown_func.h"
#include "engine_gui.h"
#include "cargotype.h"
#include "core/geometry_func.hpp"
#include "table/strings.h"
@@ -1261,6 +1262,14 @@ struct BuildVehicleWindow : Window {
case BUILD_VEHICLE_WIDGET_PANEL:
size->height = this->details_height;
break;
case BUILD_VEHICLE_WIDGET_SORT_ASSENDING_DESCENDING: {
Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the string is centred and it also looks better.
d.height += padding.height;
*size = maxdim(*size, d);
}
@@ -26,6 +26,7 @@
#include "engine_func.h"
#include "landscape_type.h"
#include "date_func.h"
#include "table/sprites.h"
@@ -475,6 +476,14 @@ public:
resize->height = FONT_HEIGHT_NORMAL;
size->height = resize->height * 10 + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
case SLWW_SORT_BYNAME:
case SLWW_SORT_BYDATE: {
Status change: