| 349 | } |
| 350 | |
| 351 | void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override |
| 352 | { |
| 353 | switch (widget) { |
| 354 | case WID_NGRFI_VEH_CHAIN: { |
| 355 | assert(this->HasChainIndex()); |
| 356 | GrfSpecFeature f = GetFeatureNum(this->window_number); |
| 357 | size.height = std::max(size.height, GetVehicleImageCellSize((VehicleType)(VEH_TRAIN + (f - GSF_TRAINS)), EIT_IN_DEPOT).height + 2 + WidgetDimensions::scaled.bevel.Vertical()); |
| 358 | break; |
| 359 | } |
| 360 | |
| 361 | case WID_NGRFI_MAINPANEL: |
| 362 | fill.height = resize.height = std::max(11, GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.vsep_normal); |
| 363 | resize.width = 1; |
| 364 | |
| 365 | size.height = 5 * resize.height + WidgetDimensions::scaled.frametext.Vertical(); |
| 366 | break; |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | /** |
| 371 | * Helper function to draw a string (line) in the window. |
nothing calls this directly
no test coverage detected