Change: Use CenterBounds function in more places.
CenterBounds may have a 1 pixel difference so the result is not exactly the same.
This commit is contained in:
@@ -488,7 +488,7 @@ public:
|
||||
int cg_ofst = HasBit(this->cargo_filter, cs->Index()) ? 1 : 0;
|
||||
GfxFillRect(r.left + cg_ofst + 1, r.top + cg_ofst + 1, r.right - 1 + cg_ofst, r.bottom - 1 + cg_ofst, cs->rating_colour);
|
||||
TextColour tc = GetContrastColour(cs->rating_colour);
|
||||
DrawString(r.left + cg_ofst, r.right + cg_ofst, r.top + (r.bottom - r.top - FONT_HEIGHT_SMALL) / 2 + cg_ofst, cs->abbrev, tc, SA_HOR_CENTER);
|
||||
DrawString(r.left + cg_ofst, r.right + cg_ofst, CenterBounds(r.top, r.bottom, FONT_HEIGHT_SMALL) + cg_ofst, cs->abbrev, tc, SA_HOR_CENTER);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user