Fix: Use width of tiny arrow string instead of scaled pixels in ship/aircraft list. (#9102)

This commit is contained in:
PeterN
2021-04-25 17:51:03 +01:00
committed by GitHub
parent 9d6ff1c780
commit f158957a4e
2 changed files with 16 additions and 8 deletions

View File

@@ -83,6 +83,7 @@ struct BaseVehicleListWindow : public Window {
byte unitnumber_digits; ///< The number of digits of the highest unit number.
Scrollbar *vscroll;
VehicleListIdentifier vli; ///< Identifier of the vehicle list we want to currently show.
uint order_arrow_width; ///< Width of the arrow in the small order list.
typedef GUIVehicleGroupList::SortFunction VehicleGroupSortFunction;
typedef GUIVehicleList::SortFunction VehicleIndividualSortFunction;
@@ -104,6 +105,8 @@ struct BaseVehicleListWindow : public Window {
BaseVehicleListWindow(WindowDesc *desc, WindowNumber wno);
void OnInit() override;
void UpdateSortingFromGrouping();
void DrawVehicleListItems(VehicleID selected_vehicle, int line_height, const Rect &r) const;