1
0
Fork 0

Fix: Maximum space for engine preview image was never scaled. (#10219)

pull/10225/head
PeterN 2022-12-05 17:57:27 +00:00 committed by GitHub
parent 13d2d11fa8
commit 53b827c460
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@
#include "ship.h"
#include "aircraft.h"
#include "engine_cmd.h"
#include "zoom_func.h"
#include "widgets/engine_widget.h"
@ -94,7 +95,7 @@ struct EnginePreviewWindow : Window {
case VEH_SHIP: GetShipSpriteSize( engine, x, y, x_offs, y_offs, image_type); break;
case VEH_AIRCRAFT: GetAircraftSpriteSize(engine, x, y, x_offs, y_offs, image_type); break;
}
this->vehicle_space = std::max<int>(40, y - y_offs);
this->vehicle_space = std::max<int>(ScaleSpriteTrad(40), y - y_offs);
size->width = std::max(size->width, x - x_offs);
SetDParam(0, GetEngineCategoryName(engine));