diff --git a/src/departures_gui.cpp b/src/departures_gui.cpp index 14ed6f834e..3704f1a6be 100644 --- a/src/departures_gui.cpp +++ b/src/departures_gui.cpp @@ -32,6 +32,7 @@ #include "company_type.h" #include "departures_func.h" #include "cargotype.h" +#include "zoom_func.h" #include "table/sprites.h" #include "table/strings.h" @@ -280,6 +281,7 @@ public: case WID_DB_LIST: resize->height = DeparturesWindow::entry_height; size->height = 2 * resize->height; + size->width = this->min_width; break; } } @@ -475,10 +477,8 @@ public: uint new_width = this->GetMinWidth(); if (new_width != this->min_width) { - NWidgetCore *n = this->GetWidget(WID_DB_LIST); - n->SetMinimalSize(new_width, 0); - this->ReInit(); this->min_width = new_width; + this->ReInit(); } uint new_height = 1 + FONT_HEIGHT_NORMAL + 1 + (_settings_client.gui.departure_larger_font ? FONT_HEIGHT_NORMAL : FONT_HEIGHT_SMALL) + 1 + 1;