1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-21 13:39:09 +00:00

Change: Centre company face in scaled widget. (#10688)

This commit is contained in:
2023-04-21 19:54:04 +01:00
committed by GitHub
parent 6b077ce25c
commit 018f0f63a6
4 changed files with 18 additions and 14 deletions

View File

@@ -227,7 +227,7 @@ public:
break;
}
case WID_EM_FACE: {
Dimension face_size = GetSpriteSize(SPR_GRADIENT);
Dimension face_size = GetScaledSpriteSize(SPR_GRADIENT);
size->width = std::max(size->width, face_size.width);
size->height = std::max(size->height, face_size.height);
break;
@@ -287,7 +287,7 @@ public:
switch (widget) {
case WID_EM_FACE: {
const Company *c = Company::Get(this->face);
DrawCompanyManagerFace(c->face, c->colour, r.left, r.top);
DrawCompanyManagerFace(c->face, c->colour, r);
break;
}