diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 48fc622dc2..d26accbd6b 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -1579,8 +1579,9 @@ struct BuildVehicleWindow : Window { } /* Add cargos */ + Dimension d = GetLargestCargoIconSize(); for (const CargoSpec *cs : _sorted_standard_cargo_specs) { - list.push_back(std::make_unique(cs->name, cs->Index(), false)); + list.push_back(std::make_unique(d, cs->GetCargoIcon(), PAL_NONE, cs->name, cs->Index(), false)); } return list; diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 328824f0df..530b1a37fb 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -1753,8 +1753,9 @@ public: list.push_back(std::make_unique(this->GetCargoFilterLabel(CF_NONE), CF_NONE, false)); /* Add cargos */ + Dimension d = GetLargestCargoIconSize(); for (const CargoSpec *cs : _sorted_standard_cargo_specs) { - list.push_back(std::make_unique(cs->name, cs->Index(), false)); + list.push_back(std::make_unique(d, cs->GetCargoIcon(), PAL_NONE, cs->name, cs->Index(), false)); } return list; @@ -3088,8 +3089,9 @@ struct IndustryCargoesWindow : public Window { case WID_IC_CARGO_DROPDOWN: { DropDownList lst; + Dimension d = GetLargestCargoIconSize(); for (const CargoSpec *cs : _sorted_standard_cargo_specs) { - lst.push_back(std::make_unique(cs->name, cs->Index(), false)); + lst.push_back(std::make_unique(d, cs->GetCargoIcon(), PAL_NONE, cs->name, cs->Index(), false)); } if (!lst.empty()) { int selected = (this->ind_cargo >= NUM_INDUSTRYTYPES) ? (int)(this->ind_cargo - NUM_INDUSTRYTYPES) : -1; diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index dff391c8a9..51c2c67462 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -383,8 +383,9 @@ DropDownList BaseVehicleListWindow::BuildCargoDropDownList() const list.push_back(std::make_unique(this->GetCargoFilterLabel(CF_NONE), CF_NONE, false)); /* Add cargos */ + Dimension d = GetLargestCargoIconSize(); for (const CargoSpec *cs : _sorted_cargo_specs) { - list.push_back(std::make_unique(cs->name, cs->Index(), false)); + list.push_back(std::make_unique(d, cs->GetCargoIcon(), PAL_NONE, cs->name, cs->Index(), false)); } return list;